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

Author: Timothy Arceri <tarc...@itsqueeze.com>
Date:   Fri Feb  9 17:15:54 2018 +1100

ac: fix some 64bit unpack asserts

Previously the asserts did not take swizzles into account.

Reviewed-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>

---

 src/amd/common/ac_nir_to_llvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 3691555208..396627bf1b 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2042,7 +2042,7 @@ static void visit_alu(struct ac_nir_context *ctx, const 
nir_alu_instr *instr)
                break;
 
        case nir_op_unpack_64_2x32_split_x: {
-               assert(instr->src[0].src.ssa->num_components == 1);
+               assert(ac_get_llvm_num_components(src[0]) == 1);
                LLVMValueRef tmp = LLVMBuildBitCast(ctx->ac.builder, src[0],
                                                    ctx->ac.v2i32,
                                                    "");
@@ -2052,7 +2052,7 @@ static void visit_alu(struct ac_nir_context *ctx, const 
nir_alu_instr *instr)
        }
 
        case nir_op_unpack_64_2x32_split_y: {
-               assert(instr->src[0].src.ssa->num_components == 1);
+               assert(ac_get_llvm_num_components(src[0]) == 1);
                LLVMValueRef tmp = LLVMBuildBitCast(ctx->ac.builder, src[0],
                                                    ctx->ac.v2i32,
                                                    "");

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to