mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
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:f003859f97nir: Make gl_nir_lower_samplers use gl_nir_lower_samplers_as_deref Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (cherry picked from commit9e0c744f07)
This commit is contained in:
parent
f9eaa873cf
commit
2e63686268
1 changed files with 1 additions and 0 deletions
|
|
@ -167,6 +167,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue