radv: use emit_icmp for samples_identical
authorDave Airlie <airlied@redhat.com>
Thu, 20 Oct 2016 00:42:22 +0000 (01:42 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 20 Oct 2016 00:43:55 +0000 (01:43 +0100)
On a debug llvm build we'd assert on the next compare
when the return from samples_identical was i1 instead
of i32.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c

index e2f6bcaaa4ec93704a7c4b5424284ca9f09b20c6..08dac80eb6ffdc91ad5979b83de6f88abb84a16a 100644 (file)
@@ -3412,7 +3412,7 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
                result = build_tex_intrinsic(ctx, instr, &txf_info);
 
                result = LLVMBuildExtractElement(ctx->builder, result, ctx->i32zero, "");
-               result = LLVMBuildICmp(ctx->builder, LLVMIntEQ, result, ctx->i32zero, "");
+               result = emit_int_cmp(ctx, LLVMIntEQ, result, ctx->i32zero);
                goto write_result;
        }