ac/nir: do not sign-extend the result of texop_samples_identical
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: e690a1b78b ("ac/llvm: don't lower bool to int32, switch to native i1 bool")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7236>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user