radv: fix samples_identical return value.
authorDave Airlie <airlied@redhat.com>
Wed, 19 Oct 2016 05:43:26 +0000 (15:43 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 19 Oct 2016 07:39:01 +0000 (17:39 +1000)
This was returning an inversion, so not doing as it should have.

We need to compare the fmask value with 0, and return the result
from that.

src/amd/common/ac_nir_to_llvm.c

index ad32e15ba122c1fa7bf2c0832850d739158488f0..e2f6bcaaa4ec93704a7c4b5424284ca9f09b20c6 100644 (file)
@@ -3410,6 +3410,9 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
                                   txf_address, txf_count, 0xf);
 
                result = build_tex_intrinsic(ctx, instr, &txf_info);
+
+               result = LLVMBuildExtractElement(ctx->builder, result, ctx->i32zero, "");
+               result = LLVMBuildICmp(ctx->builder, LLVMIntEQ, result, ctx->i32zero, "");
                goto write_result;
        }