aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-08-22 12:34:48 +0200
committerSamuel Pitoiset <[email protected]>2017-08-22 13:58:51 +0200
commite2f3cfead92dacbfd24c597034301c713775a138 (patch)
tree792ad33cfa4b40f936d1dd5552247c75e9bb5027 /src/mesa/state_tracker
parentcdaaf6656653822fc04dbf99804888c5cd126e97 (diff)
st/glsl_to_tgsi: fix getting the image type for array of structs (again)
We want the type of the field, not of the struct. This fixes a regression in the following piglit test: arb_bindless_texture/compiler/images/arrays-of-struct.frag Fixes: 49d9286a3f ("glsl: stop copying struct and interface member names") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 221dc101079..d12434101f3 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3764,12 +3764,10 @@ get_image_qualifiers(ir_dereference *ir, const glsl_type **type,
switch (ir->ir_type) {
case ir_type_dereference_record: {
ir_dereference_record *deref_record = ir->as_dereference_record();
-
- *type = deref_record->type;
-
- const glsl_type *struct_type =
- deref_record->record->type->without_array();
+ const glsl_type *struct_type = deref_record->record->type;
int fild_idx = deref_record->field_idx;
+
+ *type = struct_type->fields.structure[fild_idx].type->without_array();
*memory_coherent =
struct_type->fields.structure[fild_idx].memory_coherent;
*memory_volatile =