From ea670ac1502788e5376aa2432f9c99fa75bf3d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 14 Jan 2021 00:03:23 -0500 Subject: [PATCH] radeonsi: skip some code for ALLOW_PRIM_DISCARD_CS if tess or GS is enabled Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index ae0878b111b..2abcaa03408 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -1847,7 +1847,7 @@ static void si_draw_vbo(struct pipe_context *ctx, } /* Determine if we can use the primitive discard compute shader. */ - if (ALLOW_PRIM_DISCARD_CS && + if (ALLOW_PRIM_DISCARD_CS && !HAS_TESS && !HAS_GS && (total_direct_count > sctx->prim_discard_vertex_count_threshold ? (sctx->compute_num_verts_rejected += total_direct_count, true) : /* Add, then return true. */ @@ -2089,7 +2089,8 @@ static void si_draw_vbo(struct pipe_context *ctx, } assert(sctx->dirty_atoms == 0); - si_emit_draw_packets + si_emit_draw_packets (sctx, info, indirect, draws, num_draws, indexbuf, index_size, index_offset, instance_count, dispatch_prim_discard_cs, original_index_size); @@ -2120,7 +2121,8 @@ static void si_draw_vbo(struct pipe_context *ctx, } assert(sctx->dirty_atoms == 0); - si_emit_draw_packets + si_emit_draw_packets (sctx, info, indirect, draws, num_draws, indexbuf, index_size, index_offset, instance_count, dispatch_prim_discard_cs, original_index_size);