From f0ea41e55e07315523c6f33e32d9de7a03b49b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 6 May 2015 19:44:06 +0300 Subject: [PATCH] nir: reset sampler index within a struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes bugs with special cases where we have tables of structures containing samplers or arrays of samplers. Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90114 --- src/glsl/nir/nir_lower_samplers.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/nir/nir_lower_samplers.cpp b/src/glsl/nir/nir_lower_samplers.cpp index cf8ab83..3e9ee20 100644 --- a/src/glsl/nir/nir_lower_samplers.cpp +++ b/src/glsl/nir/nir_lower_samplers.cpp @@ -117,6 +117,7 @@ lower_sampler(nir_tex_instr *instr, const struct gl_shader_program *shader_progr const char *field = glsl_get_struct_elem_name(deref->type, deref_struct->index); ralloc_asprintf_append(&name, ".%s", field); + instr->sampler_index = 0; break; } -- 2.1.0