mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
gallium: Add st_context_iface::share to st_api.
It will be used to implement wglShareLists. Fill st_context_iface::copy for glXCopyContext as well.
This commit is contained in:
parent
28105471af
commit
4f38dcd974
2 changed files with 28 additions and 1 deletions
|
|
@ -348,6 +348,12 @@ struct st_context_iface
|
|||
void (*copy)(struct st_context_iface *stctxi,
|
||||
struct st_context_iface *stsrci, unsigned mask);
|
||||
|
||||
/**
|
||||
* Used to implement wglShareLists.
|
||||
*/
|
||||
boolean (*share)(struct st_context_iface *stctxi,
|
||||
struct st_context_iface *stsrci);
|
||||
|
||||
/**
|
||||
* Look up and return the info of a resource for EGLImage.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -610,6 +610,26 @@ st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
st_context_copy(struct st_context_iface *stctxi,
|
||||
struct st_context_iface *stsrci, unsigned mask)
|
||||
{
|
||||
struct st_context *st = (struct st_context *) stctxi;
|
||||
struct st_context *src = (struct st_context *) stsrci;
|
||||
|
||||
_mesa_copy_context(src->ctx, st->ctx, mask);
|
||||
}
|
||||
|
||||
static boolean
|
||||
st_context_share(struct st_context_iface *stctxi,
|
||||
struct st_context_iface *stsrci)
|
||||
{
|
||||
struct st_context *st = (struct st_context *) stctxi;
|
||||
struct st_context *src = (struct st_context *) stsrci;
|
||||
|
||||
return _mesa_share_state(st->ctx, src->ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
st_context_destroy(struct st_context_iface *stctxi)
|
||||
{
|
||||
|
|
@ -677,7 +697,8 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
|
|||
st_context_notify_invalid_framebuffer;
|
||||
st->iface.flush = st_context_flush;
|
||||
st->iface.teximage = st_context_teximage;
|
||||
st->iface.copy = NULL;
|
||||
st->iface.copy = st_context_copy;
|
||||
st->iface.share = st_context_share;
|
||||
st->iface.st_context_private = (void *) smapi;
|
||||
|
||||
return &st->iface;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue