Mesa (master): st/glsl_to_tgsi: fix [ui]vec[34] conversion to double

Nicolai Hähnle nh at kemper.freedesktop.org
Mon Oct 17 17:13:03 UTC 2016


Module: Mesa
Branch: master
Commit: c3ce0d22b4cf95992cf402a70beca3f2877bcf98
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3ce0d22b4cf95992cf402a70beca3f2877bcf98

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Thu Oct 13 16:40:11 2016 +0200

st/glsl_to_tgsi: fix [ui]vec[34] conversion to double

The corresponding opcodes for integers need to be treated the same as F2D.

Fixes GL45-CTS.gpu_shader_fp64.conversions.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 682c034..f49a873 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -869,8 +869,9 @@ glsl_to_tgsi_visitor::emit_asm(ir_instruction *ir, unsigned op,
 
             } else {
                /* some opcodes are special case in what they use as sources
-                  - F2D is a float src0, DLDEXP is integer src1 */
-               if (op == TGSI_OPCODE_F2D ||
+                  - [FUI]2D/[UI]2I64 is a float/[u]int src0, DLDEXP is integer src1 */
+               if (op == TGSI_OPCODE_F2D || op == TGSI_OPCODE_U2D || op == TGSI_OPCODE_I2D ||
+                   op == TGSI_OPCODE_I2I64 || op == TGSI_OPCODE_U2I64 ||
                    op == TGSI_OPCODE_DLDEXP ||
                    (op == TGSI_OPCODE_UCMP && dst_is_64bit[0])) {
                   dinst->src[j].swizzle = MAKE_SWIZZLE4(swz, swz, swz, swz);




More information about the mesa-commit mailing list