[Mesa-dev] [PATCH] st/glsl_to_tgsi: don't increase immediate index by 1.

Dave Airlie airlied at gmail.com
Wed Jun 22 01:00:27 UTC 2016


From: Dave Airlie <airlied at redhat.com>

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 9de603c..3d8ddc3 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -816,7 +816,7 @@ glsl_to_tgsi_visitor::emit_asm(ir_instruction *ir, unsigned op,
 
             if (glsl_base_type_is_64bit(dinst->src[j].type)) {
                dinst->src[j].index = initial_src_idx[j];
-               if (swz > 1) {
+               if (swz > 1 && dinst->src[j].file != PROGRAM_IMMEDIATE) {
                   dinst->src[j].double_reg2 = true;
                   dinst->src[j].index++;
 	       }
-- 
2.5.5



More information about the mesa-dev mailing list