From eacdad7ea0df5d9804282f697b3cfeebf88a1325 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 20 Oct 2020 16:54:45 +0200 Subject: [PATCH] ac/nir: do not sign-extend the result of texop_samples_identical MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The return value should be a NIR 1-bit bool. This fixes a regression with piglit ext_shader_samples_identical-simple-fs 2 on RadeonSI. Fixes: e690a1b78bf ("ac/llvm: don't lower bool to int32, switch to native i1 bool") Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák Part-of: --- src/amd/llvm/ac_nir_to_llvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 6fef028bc3a..c1d82198e8d 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -4254,9 +4254,7 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr) result = build_tex_intrinsic(ctx, instr, &txf_args); result = LLVMBuildExtractElement(ctx->ac.builder, result, ctx->ac.i32_0, ""); - result = LLVMBuildSExt(ctx->ac.builder, - emit_int_cmp(&ctx->ac, LLVMIntEQ, result, ctx->ac.i32_0), - ctx->ac.i32, ""); + result = emit_int_cmp(&ctx->ac, LLVMIntEQ, result, ctx->ac.i32_0); goto write_result; }