From 750c38fad1f19e2403b4960674006c5f932075ad Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 27 Apr 2016 21:07:07 -0700 Subject: [PATCH] glsl: Lower vector_extracts to swizzles after lower_vector_derefs. lower_vector_derefs can produce new vector_extract operations. Neither i965 nor st_glsl_to_tgsi can handle them, so we'd best convert them to swizzles. Together with the previous patch, this fixes assertion failures in GLideN64, as well as a new Piglit test which reproduces the issue: spec/glsl-1.10/compiler/vector-dereference-in-dereference.frag Cc: mesa-stable@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95164 Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick --- src/compiler/glsl/linker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index dcc8a57b6be..7bd795c9a38 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4813,6 +4813,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) &prog->Comp.SharedSize); lower_vector_derefs(prog->_LinkedShaders[i]); + do_vec_index_to_swizzle(prog->_LinkedShaders[i]->ir); } done: -- 2.30.2