diff options
author | Kenneth Graunke <[email protected]> | 2019-04-11 07:04:58 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-04-12 10:35:08 -0700 |
commit | 9e0c744f07a21fc7bb018a77cf83b057436d0d1b (patch) | |
tree | 091d5d8bf762f5406b06253bec48b2db8e47ef85 /src/compiler | |
parent | f4fc2ece5776a2c15d9db0a2ff2b94491cfc3ebb (diff) |
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 <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/gl_nir_lower_samplers_as_deref.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c index 27e2d780e70..b56ae0c5043 100644 --- a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c +++ b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c @@ -177,6 +177,7 @@ lower_deref(nir_builder *b, struct lower_samplers_as_deref_state *state, } else { var = nir_variable_create(state->shader, nir_var_uniform, type, name); var->data.binding = binding; + var->data.location = location; _mesa_hash_table_insert_pre_hashed(state->remap_table, hash, name, var); } |