summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/standalone.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-01-03 16:12:20 -0800
committerKenneth Graunke <[email protected]>2019-01-07 14:25:04 -0800
commitc69f9297cfb6a1f29579fefd3b969d7ad78ec869 (patch)
tree5046b6dfcf06a95f4969be47c5a211d89ad786ad /src/compiler/glsl/standalone.cpp
parentbe6cee51c06dc72ac159bd75b4201c61952515bd (diff)
nir: Fix gl_nir_lower_samplers_as_deref's structure type handling.
We recurse to remove structures, and at each step, re-modify the resulting type for our link in the deref chain. For arrays, the result of recursion is the new underlying type - so we wrap it with the array dimensionality again. For structs, we want to simply use the new underlying type, skipping the struct altogether. The correct way to do this is to do nothing at all. Previously, we had reset type to next->type, which is the /old/ field type, not the new field type we obtained by recursing. This undid our recursive work. Fixes about 338 tests with nested structs, such as: dEQP-GLES2.functional.uniform_api.value.initial.get_uniform.nested_structs_arrays.sampler2D_samplerCube_fragment Note that currently only radeonsi uses this pass, and NIR support is disabled there by default, so the breakage was likely not seen by most people. The next commit uses this pass for more drivers, so this fix prevents regressions from that change. Reviewed-by: Ian Romanick <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/glsl/standalone.cpp')
0 files changed, 0 insertions, 0 deletions