mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-19 17:58:09 +02:00
gallium: add the u_vbuf pointer into pipe_context
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>
This commit is contained in:
parent
a9934a9f64
commit
4a92492a8a
2 changed files with 6 additions and 0 deletions
|
|
@ -259,7 +259,9 @@ cso_init_vbuf(struct cso_context *cso, unsigned flags)
|
|||
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;
|
||||
}
|
||||
|
|
@ -451,6 +453,8 @@ cso_destroy_context(struct cso_context *ctx)
|
|||
|
||||
if (ctx->vbuf)
|
||||
u_vbuf_destroy(ctx->vbuf);
|
||||
|
||||
ctx->pipe->vbuf = NULL;
|
||||
FREE(ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ union pipe_query_result;
|
|||
struct u_log_context;
|
||||
struct u_upload_mgr;
|
||||
struct util_debug_callback;
|
||||
struct u_vbuf;
|
||||
|
||||
/**
|
||||
* Gallium rendering context. Basically:
|
||||
|
|
@ -95,6 +96,7 @@ struct pipe_context {
|
|||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue