diff options
author | Kenneth Graunke <[email protected]> | 2016-04-27 21:07:07 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-05-05 13:59:33 +0100 |
commit | a407f06ef6688168e9d761e5f2384097641acb66 (patch) | |
tree | b7c240125c8c38f2f98b60a542e30ca8ed17f0d8 /src | |
parent | d12a19de60f2edfa06298eb0dcc5e75d2e1f47ad (diff) |
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: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95164
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
(cherry picked from commit 750c38fad1f19e2403b4960674006c5f932075ad)
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 4cec1077025..b8a1fd405cc 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4658,6 +4658,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: |