Mesa (master): ac/nir: to integer the args to bcsel.
Dave Airlie
airlied at kemper.freedesktop.org
Tue Feb 20 23:16:32 UTC 2018
Module: Mesa
Branch: master
Commit: d5b2d7ed670e6b6a2d7a96e588cb3de852d0b289
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d5b2d7ed670e6b6a2d7a96e588cb3de852d0b289
Author: Dave Airlie <airlied at redhat.com>
Date: Tue Feb 20 10:15:18 2018 +1000
ac/nir: to integer the args to bcsel.
dEQP-VK.tessellation.invariance.outer_edge_symmetry.triangles_equal_spacing_ccw
was hitting an llvm assert due to one value being an int and the
other a float.
This just casts both values to integer and fixes the test.
Fixes: dEQP-VK.tessellation.invariance.outer_edge_symmetry.triangles_equal_spacing_ccw
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/common/ac_nir_to_llvm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 12f097e2b2..2185c53834 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1314,7 +1314,8 @@ static LLVMValueRef emit_bcsel(struct ac_llvm_context *ctx,
{
LLVMValueRef v = LLVMBuildICmp(ctx->builder, LLVMIntNE, src0,
ctx->i32_0, "");
- return LLVMBuildSelect(ctx->builder, v, src1, src2, "");
+ return LLVMBuildSelect(ctx->builder, v, ac_to_integer(ctx, src1),
+ ac_to_integer(ctx, src2), "");
}
static LLVMValueRef emit_minmax_int(struct ac_llvm_context *ctx,
More information about the mesa-commit
mailing list