[Mesa-dev] [PATCH 4/9] glsl/lower_64bit: use the correct packing function for doubles

Dave Airlie airlied at gmail.com
Thu Feb 1 03:33:53 UTC 2018


From: Dave Airlie <airlied at redhat.com>

This picks the correct double packing function.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/compiler/glsl/lower_64bit.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/compiler/glsl/lower_64bit.cpp b/src/compiler/glsl/lower_64bit.cpp
index c7c6d1cb31..020ec2e9c3 100644
--- a/src/compiler/glsl/lower_64bit.cpp
+++ b/src/compiler/glsl/lower_64bit.cpp
@@ -255,8 +255,10 @@ lower_64bit::compact_destination(ir_factory &body,
                                  ir_variable *result[4])
 {
    const ir_expression_operation pack_opcode =
-      type->base_type == GLSL_TYPE_UINT64
-      ? ir_unop_pack_uint_2x32 : ir_unop_pack_int_2x32;
+      type->base_type == GLSL_TYPE_DOUBLE
+      ? ir_unop_pack_double_2x32 :
+      (type->base_type == GLSL_TYPE_UINT64
+      ? ir_unop_pack_uint_2x32 : ir_unop_pack_int_2x32);
 
    ir_variable *const compacted_result =
       body.make_temp(type, "compacted_64bit_result");
-- 
2.14.3



More information about the mesa-dev mailing list