summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2021-01-14 08:23:04 -0500
committerMarge Bot <eric+marge@anholt.net>2021-01-22 16:45:30 +0000
commit01e3d28829b297d87c025a9bd8d679c6c1cb811b (patch)
treeb15705ab572ffe11d3513cf264b3f03544a717fd
parentea670ac1502788e5376aa2432f9c99fa75bf3d56 (diff)
radeonsi: enable accidentally disabled fast launch with non-indexed tri strips
Only *indexed* triangle strips hang. 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.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index 2abcaa03408..e7385a88536 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -1965,13 +1965,17 @@ static void si_draw_vbo(struct pipe_context *ctx,
min_direct_count >= 3 && !HAS_TESS && !HAS_GS) {
if (prim == PIPE_PRIM_TRIANGLES && !index_size) {
ngg_culling |= SI_NGG_CULL_GS_FAST_LAUNCH_TRI_LIST;
+ } else if (prim == PIPE_PRIM_TRIANGLE_STRIP) {
+ if (!index_size) {
+ ngg_culling |= SI_NGG_CULL_GS_FAST_LAUNCH_TRI_STRIP;
+ } else if (!primitive_restart) {
#if 0 /* It's disabled because this hangs: AMD_DEBUG=nggc torcs */
- } else if (prim == PIPE_PRIM_TRIANGLE_STRIP && !primitive_restart) {
- ngg_culling |= SI_NGG_CULL_GS_FAST_LAUNCH_TRI_STRIP |
- SI_NGG_CULL_GS_FAST_LAUNCH_INDEX_SIZE_PACKED(MIN2(index_size, 3));
- /* The index buffer will be emulated. */
- index_size = 0;
+ ngg_culling |= SI_NGG_CULL_GS_FAST_LAUNCH_TRI_STRIP |
+ SI_NGG_CULL_GS_FAST_LAUNCH_INDEX_SIZE_PACKED(MIN2(index_size, 3));
+ /* The index buffer will be emulated. */
+ index_size = 0;
#endif
+ }
}
}