From 67b6e5b907096ce9eee32c36c164acd38574cf14 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 28 Jan 2009 16:11:46 +0000 Subject: wgl: split device structs, move swapbuffers to shared Each of icd, shared and wgl now have the opportunity to maintain their own per-device structs, which should reduce the need for these modules to be looking into each others structures. --- src/gallium/state_trackers/wgl/shared/stw_device.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/gallium/state_trackers/wgl/shared/stw_device.c') diff --git a/src/gallium/state_trackers/wgl/shared/stw_device.c b/src/gallium/state_trackers/wgl/shared/stw_device.c index 63ee066824..88eeae7de7 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_device.c +++ b/src/gallium/state_trackers/wgl/shared/stw_device.c @@ -34,6 +34,8 @@ #include "shared/stw_device.h" #include "shared/stw_winsys.h" #include "shared/stw_pixelformat.h" +#include "shared/stw_public.h" +#include "stw.h" struct stw_device *stw_dev = NULL; @@ -57,7 +59,7 @@ st_flush_frontbuffer(struct pipe_winsys *ws, boolean -st_init(const struct stw_winsys *stw_winsys) +stw_shared_init(const struct stw_winsys *stw_winsys) { static struct stw_device stw_dev_storage; @@ -86,17 +88,7 @@ error1: void -st_cleanup(void) +stw_shared_cleanup(void) { - DHGLRC dhglrc; - - if(!stw_dev) - return; - - /* Ensure all contexts are destroyed */ - for (dhglrc = 1; dhglrc <= DRV_CONTEXT_MAX; dhglrc++) - if (stw_dev->ctx_array[dhglrc - 1].hglrc) - DrvDeleteContext( dhglrc ); - stw_dev = NULL; } -- cgit v1.2.3