mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
wgl: Split DrvReleaseContext to support unbind via pointer
Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed By: Bill Kristiansen <billkris@microsoft.com> Acked-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
This commit is contained in:
parent
c4806ae03c
commit
49d83de072
2 changed files with 19 additions and 12 deletions
|
|
@ -360,19 +360,9 @@ DrvDeleteContext(DHGLRC dhglrc)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
BOOL APIENTRY
|
||||
DrvReleaseContext(DHGLRC dhglrc)
|
||||
BOOL
|
||||
stw_unbind_context(struct stw_context *ctx)
|
||||
{
|
||||
struct stw_context *ctx;
|
||||
|
||||
if (!stw_dev)
|
||||
return FALSE;
|
||||
|
||||
stw_lock_contexts(stw_dev);
|
||||
ctx = stw_lookup_context_locked( dhglrc );
|
||||
stw_unlock_contexts(stw_dev);
|
||||
|
||||
if (!ctx)
|
||||
return FALSE;
|
||||
|
||||
|
|
@ -389,6 +379,21 @@ DrvReleaseContext(DHGLRC dhglrc)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL APIENTRY
|
||||
DrvReleaseContext(DHGLRC dhglrc)
|
||||
{
|
||||
struct stw_context *ctx;
|
||||
|
||||
if (!stw_dev)
|
||||
return FALSE;
|
||||
|
||||
stw_lock_contexts(stw_dev);
|
||||
ctx = stw_lookup_context_locked( dhglrc );
|
||||
stw_unlock_contexts(stw_dev);
|
||||
|
||||
return stw_unbind_context(ctx);
|
||||
}
|
||||
|
||||
|
||||
DHGLRC
|
||||
stw_get_current_context( void )
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ DHGLRC stw_create_context_handle(struct stw_context *context, DHGLRC handle);
|
|||
|
||||
void stw_destroy_context(struct stw_context *);
|
||||
|
||||
BOOL stw_unbind_context(struct stw_context *);
|
||||
|
||||
DHGLRC stw_get_current_context( void );
|
||||
|
||||
struct stw_context *stw_current_context(void);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue