summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/wgl
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-11-11 00:21:12 +0800
committerChia-I Wu <olv@lunarg.com>2010-11-18 11:56:01 +0800
commitdb1689c23629d2cf66a7a35ed0e899006ef2af52 (patch)
tree3e478dd683797787c9859240dba5334f7daf4578 /src/gallium/state_trackers/wgl
parent4f38dcd97410d0a58be19cb5c6dfbee51a3b7561 (diff)
st/wgl: Use st_context_iface::share for DrvShareLists.
Diffstat (limited to 'src/gallium/state_trackers/wgl')
-rw-r--r--src/gallium/state_trackers/wgl/stw_context.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_context.c b/src/gallium/state_trackers/wgl/stw_context.c
index 85878b4673..86c0a28e8d 100644
--- a/src/gallium/state_trackers/wgl/stw_context.c
+++ b/src/gallium/state_trackers/wgl/stw_context.c
@@ -29,12 +29,10 @@
#include "pipe/p_compiler.h"
#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "util/u_memory.h"
#include "state_tracker/st_api.h"
-/* for _mesa_share_state */
-#include "state_tracker/st_context.h"
-#include "main/core.h"
-
#include "stw_icd.h"
#include "stw_device.h"
#include "stw_winsys.h"
@@ -102,13 +100,8 @@ DrvShareLists(
ctx1 = stw_lookup_context_locked( dhglrc1 );
ctx2 = stw_lookup_context_locked( dhglrc2 );
- if (ctx1 && ctx2) {
- struct st_context *st1, *st2;
-
- st1 = (struct st_context *) ctx1->st;
- st2 = (struct st_context *) ctx2->st;
- ret = _mesa_share_state(st2->ctx, st1->ctx);
- }
+ if (ctx1 && ctx2 && ctx2->st->share)
+ ret = ctx2->st->share(ctx2->st, ctx1->st);
pipe_mutex_unlock( stw_dev->ctx_mutex );