summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/wgl/icd/stw_icd.c2
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_context.c24
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_public.h2
-rw-r--r--src/gallium/state_trackers/wgl/wgl/stw_wgl.c7
4 files changed, 28 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/wgl/icd/stw_icd.c b/src/gallium/state_trackers/wgl/icd/stw_icd.c
index b259ea91f5..62af765211 100644
--- a/src/gallium/state_trackers/wgl/icd/stw_icd.c
+++ b/src/gallium/state_trackers/wgl/icd/stw_icd.c
@@ -562,7 +562,7 @@ DrvShareLists(
if (DBG)
debug_printf( "%s\n", __FUNCTION__ );
- return FALSE;
+ return stw_share_lists(dhglrc1, dhglrc2);
}
BOOL APIENTRY
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,
diff --git a/src/gallium/state_trackers/wgl/shared/stw_public.h b/src/gallium/state_trackers/wgl/shared/stw_public.h
index 59d709a6d4..7fe9cfb356 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_public.h
+++ b/src/gallium/state_trackers/wgl/shared/stw_public.h
@@ -37,6 +37,8 @@ BOOL stw_copy_context( UINT_PTR hglrcSrc,
UINT_PTR stw_create_layer_context( HDC hdc,
int iLayerPlane );
+BOOL stw_share_lists( UINT_PTR hglrc1, UINT_PTR hglrc2 );
+
BOOL stw_delete_context( UINT_PTR hglrc );
BOOL
diff --git a/src/gallium/state_trackers/wgl/wgl/stw_wgl.c b/src/gallium/state_trackers/wgl/wgl/stw_wgl.c
index 30e42e0ec5..a131292f7a 100644
--- a/src/gallium/state_trackers/wgl/wgl/stw_wgl.c
+++ b/src/gallium/state_trackers/wgl/wgl/stw_wgl.c
@@ -186,12 +186,7 @@ wglShareLists(
HGLRC hglrc1,
HGLRC hglrc2 )
{
- (void) hglrc1;
- (void) hglrc2;
-
- assert( 0 );
-
- return FALSE;
+ return stw_share_lists( (UINT_PTR)hglrc1, (UINT_PTR)hglrc2);;
}
WINGDIAPI BOOL APIENTRY