summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2021-01-14 00:03:23 -0500
committerMarge Bot <eric+marge@anholt.net>2021-01-22 16:45:30 +0000
commitea670ac1502788e5376aa2432f9c99fa75bf3d56 (patch)
tree3a4b5e4d680ee3cb86591f181be15174f29eba8c
parentdd9801a918ce488d764075de09e6bb309e539995 (diff)
radeonsi: skip some code for ALLOW_PRIM_DISCARD_CS if tess or GS is enabled
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.cpp8
1 files 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<GFX_VERSION, NGG, ALLOW_PRIM_DISCARD_CS>
+ si_emit_draw_packets<GFX_VERSION, NGG,
+ !HAS_TESS && !HAS_GS ? PRIM_DISCARD_CS_OFF : ALLOW_PRIM_DISCARD_CS>
(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<GFX_VERSION, NGG, ALLOW_PRIM_DISCARD_CS>
+ si_emit_draw_packets<GFX_VERSION, NGG,
+ !HAS_TESS && !HAS_GS ? PRIM_DISCARD_CS_OFF : ALLOW_PRIM_DISCARD_CS>
(sctx, info, indirect, draws, num_draws, indexbuf, index_size,
index_offset, instance_count,
dispatch_prim_discard_cs, original_index_size);