Mesa (master): Revert "u_vbuf: Regard non-constant vbufs with non-instance elements as free"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 30 23:41:49 UTC 2019


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Dec 30 18:41:04 2019 -0500

Revert "u_vbuf: Regard non-constant vbufs with non-instance elements as free"

This reverts commit c6ef79c488bb5fffde31e7065fd3e575f3c25fb5.

It broke torcs.

---

 src/gallium/auxiliary/util/u_vbuf.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
index a8b57aafed3..70eaebb453e 100644
--- a/src/gallium/auxiliary/util/u_vbuf.c
+++ b/src/gallium/auxiliary/util/u_vbuf.c
@@ -538,15 +538,14 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
 
 static boolean
 u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr,
-                                    unsigned mask[VB_NUM],
-                                    unsigned extra_free_vb_mask)
+                                    unsigned mask[VB_NUM])
 {
    unsigned type;
    unsigned fallback_vbs[VB_NUM];
    /* Set the bit for each buffer which is incompatible, or isn't set. */
    uint32_t unused_vb_mask =
-      (mgr->ve->incompatible_vb_mask_all | mgr->incompatible_vb_mask |
-      ~mgr->enabled_vb_mask | extra_free_vb_mask) & mgr->allowed_vb_mask;
+      mgr->ve->incompatible_vb_mask_all | mgr->incompatible_vb_mask |
+      ~mgr->enabled_vb_mask;
    uint32_t unused_vb_mask_orig;
    boolean insufficient_buffers = false;
 
@@ -607,7 +606,6 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
    unsigned i, type;
    const unsigned incompatible_vb_mask = mgr->incompatible_vb_mask &
                                          mgr->ve->used_vb_mask;
-   unsigned extra_free_vb_mask = 0;
 
    const int start[VB_NUM] = {
       start_vertex,           /* VERTEX */
@@ -653,15 +651,8 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
 
    assert(mask[VB_VERTEX] || mask[VB_INSTANCE] || mask[VB_CONST]);
 
-   /* In the case of unroll_indices, we can regard all non-constant
-    * vertex buffers with only non-instance vertex elements as incompatible
-    * and thus free.
-    */
-   if (unroll_indices)
-       extra_free_vb_mask = mask[VB_VERTEX] & ~mask[VB_INSTANCE];
-
    /* Find free vertex buffer slots. */
-   if (!u_vbuf_translate_find_free_vb_slots(mgr, mask, extra_free_vb_mask)) {
+   if (!u_vbuf_translate_find_free_vb_slots(mgr, mask)) {
       return FALSE;
    }
 




More information about the mesa-commit mailing list