Mesa (main): crocus: restrict prim_restart on index buffer check to pre-hsw

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 5 05:14:01 UTC 2021


Module: Mesa
Branch: main
Commit: b4d87a34c737145c08c892d8a08f59cb24cddad2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b4d87a34c737145c08c892d8a08f59cb24cddad2

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Jul  5 14:52:36 2021 +1000

crocus: restrict prim_restart on index buffer check to pre-hsw

This code has no use on hsw or chv

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>

---

 src/gallium/drivers/crocus/crocus_state.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/crocus/crocus_state.c b/src/gallium/drivers/crocus/crocus_state.c
index f415be460ae..ef6b2bb9e14 100644
--- a/src/gallium/drivers/crocus/crocus_state.c
+++ b/src/gallium/drivers/crocus/crocus_state.c
@@ -7761,8 +7761,12 @@ crocus_upload_render_state(struct crocus_context *ice,
 
       if (!emit_index &&
           (ice->state.index_buffer.size != size ||
-           ice->state.index_buffer.index_size != draw->index_size ||
-           ice->state.index_buffer.prim_restart != draw->primitive_restart))
+           ice->state.index_buffer.index_size != draw->index_size
+#if GFX_VERx10 < 75
+           || ice->state.index_buffer.prim_restart != draw->primitive_restart
+#endif
+	   )
+	  )
          emit_index = true;
 
       if (emit_index) {
@@ -7784,7 +7788,9 @@ crocus_upload_render_state(struct crocus_context *ice,
          ice->state.index_buffer.size = size;
          ice->state.index_buffer.offset = offset;
          ice->state.index_buffer.index_size = draw->index_size;
+#if GFX_VERx10 < 75
          ice->state.index_buffer.prim_restart = draw->primitive_restart;
+#endif
       }
    }
 



More information about the mesa-commit mailing list