From 01e3d28829b297d87c025a9bd8d679c6c1cb811b Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 14 Jan 2021 08:23:04 -0500 Subject: radeonsi: enable accidentally disabled fast launch with non-indexed tri strips Only *indexed* triangle strips hang. Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 14 +++++++++----- 1 file 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 + } } } -- cgit v1.2.3