Mesa (master): radeonsi: enable the GS tri strip adj workaround with primitive_restart

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 20 22:13:28 UTC 2021


Module: Mesa
Branch: master
Commit: 2206840f6c1e21435908abe1ca735ea524d850c5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2206840f6c1e21435908abe1ca735ea524d850c5

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Jan  9 16:24:42 2021 -0500

radeonsi: enable the GS tri strip adj workaround with primitive_restart

If a primitive restart index occurs after an even number of triangles,
the workaround works.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600>

---

 src/gallium/drivers/radeonsi/si_state_draw.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index d1a2ff67cef..685336755e6 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -1717,13 +1717,12 @@ static void si_draw_vbo(struct pipe_context *ctx,
 
    if (GFX_VERSION <= GFX9 && HAS_GS) {
       /* Determine whether the GS triangle strip adjacency fix should
-       * be applied. Rotate every other triangle if
-       * - triangle strips with adjacency are fed to the GS and
-       * - primitive restart is disabled (the rotation doesn't help
-       *   when the restart occurs after an odd number of triangles).
+       * be applied. Rotate every other triangle if triangle strips with
+       * adjacency are fed to the GS. This doesn't work if primitive
+       * restart occurs after an odd number of triangles.
        */
       bool gs_tri_strip_adj_fix =
-         !HAS_TESS && prim == PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY && !primitive_restart;
+         !HAS_TESS && prim == PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY;
 
       if (gs_tri_strip_adj_fix != sctx->gs_tri_strip_adj_fix) {
          sctx->gs_tri_strip_adj_fix = gs_tri_strip_adj_fix;



More information about the mesa-commit mailing list