st/mesa: handle indirect samplers in arrays/structs properly (v4.1)
authorDave Airlie <airlied@redhat.com>
Thu, 4 Feb 2016 06:48:18 +0000 (16:48 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 9 Feb 2016 00:52:08 +0000 (10:52 +1000)
commitbb8bbe34e3d355c457578060c5926dfc23abecfd
tree82886029662dee978c666b752c84ef6a1b4c6ea0
parent52801766a00ba3b2a93e14d1ac80afd8980d15d8
st/mesa: handle indirect samplers in arrays/structs properly (v4.1)

The state tracker never handled this properly, and it finally
annoyed me for the second time so I decided to fix it properly.

This is inspired by the NIR sampler lowering code and I only realised
NIR seems to do its deref ordering different to GLSL at the last
minute, once I got that things got much easier.

it fixes a bunch of tests in
tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/

v2: fix AoA tests when forced on.
I was right I didn't need all that code, fixing the AoA code
meant cleaning up a chunk of code I didn't like in the array
handling.

v3: start generalising the code a bit more for atomics.
v3.1: use UniformRemapTable

v4: handle uniforms differently using the param_index,
and go back to UniformStorage
fix issues identified by Timothy with deref handling.
v4.1: squash const fix and move handling 1D const out
of recursive function.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp