glsl: Set location on structure-split sampler uniform variables
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 11 Apr 2019 14:04:58 +0000 (07:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 12 Apr 2019 17:35:08 +0000 (10:35 -0700)
commit9e0c744f07a21fc7bb018a77cf83b057436d0d1b
tree091d5d8bf762f5406b06253bec48b2db8e47ef85
parentf4fc2ece5776a2c15d9db0a2ff2b94491cfc3ebb
glsl: Set location on structure-split sampler uniform variables

gl_nir_lower_samplers_as_deref splits structure uniform variables,
creating new variables for individual fields.  As part of that, it
calculates a new location.  It then never set this on the new variables.

Thanks to Michael Fiano for finding this bug.  Fixes crashes on i965
with Piglit's new tests/spec/glsl-1.10/execution/samplers/uniform-struct
test, which was reduced from the failing case in Michael's app.

Fixes: f003859f97c nir: Make gl_nir_lower_samplers use gl_nir_lower_samplers_as_deref
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/gl_nir_lower_samplers_as_deref.c