This will allow removing the draw_vbo wrapping in cso_context.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20025>
if (caps.fallback_always ||
(uses_user_vertex_buffers &&
caps.fallback_only_for_user_vbuffers)) {
+ assert(!cso->pipe->vbuf);
cso->vbuf = u_vbuf_create(cso->pipe, &caps);
+ cso->pipe->vbuf = cso->vbuf;
cso->always_use_vbuf = caps.fallback_always;
cso->vbuf_current = caps.fallback_always ? cso->vbuf : NULL;
}
if (ctx->vbuf)
u_vbuf_destroy(ctx->vbuf);
+
+ ctx->pipe->vbuf = NULL;
FREE(ctx);
}
struct u_log_context;
struct u_upload_mgr;
struct util_debug_callback;
+struct u_vbuf;
/**
* Gallium rendering context. Basically:
void *priv; /**< context private data (for DRI for example) */
void *draw; /**< private, for draw module (temporary?) */
+ struct u_vbuf *vbuf; /**< for cso_context, don't use in drivers */
/**
* Stream uploaders created by the driver. All drivers, gallium frontends, and