summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-02-20 10:15:18 +1000
committerEmil Velikov <[email protected]>2018-03-20 16:57:22 +0000
commit72796340e4699c0cdc11707de5a73833a4714ed9 (patch)
tree9bf78f63fbb751c9dae58e076eea7eb401c31402
parent5b6b4e4f3871f9d3ba64ea2ca2921c3d722b47cd (diff)
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: [email protected] Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit d5b2d7ed670e6b6a2d7a96e588cb3de852d0b289)
-rw-r--r--src/amd/common/ac_nir_to_llvm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index bb4344d5366..13d3310ac78 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1346,7 +1346,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,