radv/llvm: fix invalid IR when converting triangle strips to indices

Operand 0 of LLVMBuildSelect() should be i1.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12616>
This commit is contained in:
Samuel Pitoiset 2021-08-27 16:34:25 +02:00
parent 72b6b02e09
commit 640f15edd7

View file

@ -2496,7 +2496,7 @@ gfx10_ngg_gs_emit_epilogue_2(struct radv_shader_context *ctx)
is_odd = LLVMBuildTrunc(builder, is_odd, ctx->ac.i1, "");
LLVMValueRef flatshade_first =
LLVMConstInt(ctx->ac.i32, !ctx->args->options->key.vs.provoking_vtx_last, false);
LLVMConstInt(ctx->ac.i1, !ctx->args->options->key.vs.provoking_vtx_last, false);
ac_build_triangle_strip_indices_to_triangle(&ctx->ac, is_odd, flatshade_first, prim.index);
}