Hello, I'm in the process of working out the details of adding dynamic sampler support to mesa/st as part of ARB_gpu_shader5. Unfortunately I've run into a bit of a roadblock.
One approach I've tried is to load the indirect sampler index into an address register and then use that as the offset. However in order to realistically support that I need a 3rd address register, while right now tgsi_ureg limits it to 2 address registers. Would it be OK to relax the restriction to 3? (The reason I need a third is that if e.g. the dst has a reladdr, I'd have to change a bunch of stuff to make that function properly without a 3rd addr reg, since I can't just MOV the sampler to a temp like it does for all the other src's.) Another apporach I've tried is to just use a TEMP register as the indirect offset here. Unfortunately this gets destroyed by st_glsl_to_tgsi's various optimizations which assume that temp registers can't be reladdr's and so messes up the values. I started adding support for that, but then quickly realized that was probably not the right thing to do. So... should I increase the number of address registers to 1? Or is there some other simple approach that I'm missing? Thanks, -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev