To do this we make sure to only append the array subscript
to structs.
---
src/glsl/nir/nir_lower_samplers.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/glsl/nir/nir_lower_samplers.cpp
b/src/glsl/nir/nir_lower_samplers.cpp
index 7a0b0a0..c450198 100644
--- a/src/glsl/nir/nir_lower_samplers.cpp
+++ b/src/glsl/nir/nir_lower_samplers.cpp
@@ -72,7 +72,8 @@ lower_sampler(nir_tex_instr *instr, const struct
gl_shader_program *shader_progr
assert(deref_array->deref_array_type !=
nir_deref_array_type_wildcard);
- if (deref_array->deref.child) {
+ if (deref_array->deref.child &&
+ deref->child->type->without_array()->is_record()) {
ralloc_asprintf_append(&name, "[%u]",
deref_array->deref_array_type == nir_deref_array_type_direct ?
deref_array->base_offset : 0);
--
2.1.0
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev