Mesa (master): radeonsi: enable accidentally disabled fast launch with non-indexed tri strips
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 22 17:04:11 UTC 2021
Module: Mesa
Branch: master
Commit: 01e3d28829b297d87c025a9bd8d679c6c1cb811b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=01e3d28829b297d87c025a9bd8d679c6c1cb811b
Author: Marek Olšák <marek.olsak at amd.com>
Date: Thu Jan 14 08:23:04 2021 -0500
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 at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
---
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
+ }
}
}
More information about the mesa-commit
mailing list