From b3f71685d995d4b7fb5780a808250049ee29b641 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 13 Sep 2019 19:38:28 +0100 Subject: [PATCH] radv: never kill a NGG GS shader Seems to fix a hang with excessive vertex emissions when NGG is used for GS. Signed-off-by: Rhys Perry Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_nir_to_llvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 4cc30aa23ad..9d394fd6b0c 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -4125,7 +4125,7 @@ static void gfx10_ngg_gs_emit_vertex(struct radv_shader_context *ctx, const LLVMValueRef can_emit = LLVMBuildICmp(builder, LLVMIntULT, vertexidx, LLVMConstInt(ctx->ac.i32, ctx->shader->info.gs.vertices_out, false), ""); - ac_build_kill_if_false(&ctx->ac, can_emit); + ac_build_ifcc(&ctx->ac, can_emit, 9001); tmp = LLVMBuildAdd(builder, vertexidx, ctx->ac.i32_1, ""); tmp = LLVMBuildSelect(builder, can_emit, tmp, vertexidx, ""); @@ -4191,6 +4191,8 @@ static void gfx10_ngg_gs_emit_vertex(struct radv_shader_context *ctx, tmp = LLVMBuildLoad(builder, ctx->gs_generated_prims[stream], ""); tmp = LLVMBuildAdd(builder, tmp, LLVMBuildZExt(builder, iscompleteprim, ctx->ac.i32, ""), ""); LLVMBuildStore(builder, tmp, ctx->gs_generated_prims[stream]); + + ac_build_endif(&ctx->ac, 9001); } static void -- 2.30.2