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

Author: Marek Olšák <[email protected]>
Date:   Sat Aug  6 17:28:59 2022 -0400

cso: start without u_vbuf by default if it's not always used

no functional change, but it's convenient for future work

Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

---

 src/gallium/auxiliary/cso_cache/cso_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c 
b/src/gallium/auxiliary/cso_cache/cso_context.c
index f2aa7c0d0be..23ab26473d6 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -244,8 +244,8 @@ cso_init_vbuf(struct cso_context *cso, unsigned flags)
        (uses_user_vertex_buffers &&
         caps.fallback_only_for_user_vbuffers)) {
       cso->vbuf = u_vbuf_create(cso->pipe, &caps);
-      cso->vbuf_current = cso->vbuf;
       cso->always_use_vbuf = caps.fallback_always;
+      cso->vbuf_current = caps.fallback_always ? cso->vbuf : NULL;
    }
 }
 

Reply via email to