Mesa (19.1): svga: Remove unnecessary check for the pre flush bit for setting vertex buffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 11 14:12:01 UTC 2019


Module: Mesa
Branch: 19.1
Commit: 6f44b7ebb068c07184c31c258af2bd0dce9f17c8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f44b7ebb068c07184c31c258af2bd0dce9f17c8

Author: Charmaine Lee <charmainel at vmware.com>
Date:   Tue May  7 14:07:50 2019 -0700

svga: Remove unnecessary check for the pre flush bit for setting vertex buffers

This fixes the missing rebind when the can_pre_flush bit
is not set and the vertex buffers are the same as what have been sent.

Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Neha Bhende <bhenden at vmware.com>
Signed-off-by: Charmaine Lee <charmainel at vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
(cherry picked from commit f29b8fde915728134b2e2b912642fe573d405fcb)

---

 src/gallium/drivers/svga/svga_draw.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c
index 9e13ee8ce6d..b6c21a866fe 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -568,11 +568,11 @@ validate_vertex_buffers(struct svga_hwtnl *hwtnl)
          vbuffer_attrs[i].sid = 0;
       }
 
-      /* If we haven't yet emitted a drawing command or if any
-       * vertex buffer state is changing, issue that state now.
+      /* If any of the vertex buffer state has changed, issue
+       * the SetVertexBuffers command. Otherwise, we will just
+       * need to rebind the resources.
        */
-      if (((hwtnl->cmd.swc->hints & SVGA_HINT_FLAG_CAN_PRE_FLUSH) == 0) ||
-          vbuf_count != svga->state.hw_draw.num_vbuffers ||
+      if (vbuf_count != svga->state.hw_draw.num_vbuffers ||
           !vertex_buffers_equal(vbuf_count,
                                 vbuffer_attrs,
                                 vbuffers,




More information about the mesa-commit mailing list