summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/wgl/shared/stw_context.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-05-01 18:49:22 +0100
committerKeith Whitwell <keithw@vmware.com>2009-05-08 10:04:13 +0100
commit25a4156a8b0bc59f7d3f077526b7e3e350b072ea (patch)
treee618e2784e97b4d90f601ba13f87d531ad71547a /src/gallium/state_trackers/wgl/shared/stw_context.c
parent71b1c92405de2848de4b7effdbc236da1a4815bd (diff)
wgl: Implement ShareLists.
Diffstat (limited to 'src/gallium/state_trackers/wgl/shared/stw_context.c')
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_context.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/wgl/shared/stw_context.c b/src/gallium/state_trackers/wgl/shared/stw_context.c
index 473e3308c6..e172f09bdf 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_context.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_context.c
@@ -74,6 +74,30 @@ stw_copy_context(
return ret;
}
+BOOL
+stw_share_lists(
+ UINT_PTR hglrc1,
+ UINT_PTR hglrc2 )
+{
+ struct stw_context *ctx1;
+ struct stw_context *ctx2;
+ BOOL ret = FALSE;
+
+ pipe_mutex_lock( stw_dev->mutex );
+
+ ctx1 = stw_lookup_context_locked( hglrc1 );
+ ctx2 = stw_lookup_context_locked( hglrc2 );
+
+ if (ctx1 && ctx2 &&
+ ctx1->pfi == ctx2->pfi) {
+ ret = _mesa_share_state(ctx2->st->ctx, ctx1->st->ctx);
+ }
+
+ pipe_mutex_unlock( stw_dev->mutex );
+
+ return ret;
+}
+
UINT_PTR
stw_create_layer_context(
HDC hdc,