summaryrefslogtreecommitdiffstats
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_device.c12
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_device.h4
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_pixelformat.c2
-rw-r--r--src/gallium/state_trackers/wgl/wgl/stw_wgl.c2
5 files changed, 18 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/wgl/icd/stw_icd.c b/src/gallium/state_trackers/wgl/icd/stw_icd.c
index 1aa4b8a6e22..5ac871da814 100644
--- a/src/gallium/state_trackers/wgl/icd/stw_icd.c
+++ b/src/gallium/state_trackers/wgl/icd/stw_icd.c
@@ -30,7 +30,7 @@
#include "GL/gl.h"
-#include "pipe/p_debug.h"
+#include "util/u_debug.h"
#include "pipe/p_thread.h"
#include "shared/stw_public.h"
diff --git a/src/gallium/state_trackers/wgl/shared/stw_device.c b/src/gallium/state_trackers/wgl/shared/stw_device.c
index 6873e813ee3..4b3cf51a537 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_device.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_device.c
@@ -27,7 +27,7 @@
#include <windows.h>
-#include "pipe/p_debug.h"
+#include "util/u_debug.h"
#include "pipe/p_screen.h"
#include "shared/stw_device.h"
@@ -66,6 +66,10 @@ stw_shared_init(const struct stw_winsys *stw_winsys)
stw_dev = &stw_dev_storage;
memset(stw_dev, 0, sizeof(*stw_dev));
+#ifdef DEBUG
+ stw_dev->memdbg_no = debug_memory_begin();
+#endif
+
stw_dev->stw_winsys = stw_winsys;
stw_dev->screen = stw_winsys->create_screen();
@@ -87,5 +91,11 @@ error1:
void
stw_shared_cleanup(void)
{
+ if(stw_dev) {
+#ifdef DEBUG
+ debug_memory_end(stw_dev->memdbg_no);
+#endif
+ }
+
stw_dev = NULL;
}
diff --git a/src/gallium/state_trackers/wgl/shared/stw_device.h b/src/gallium/state_trackers/wgl/shared/stw_device.h
index bc0bce37c6e..c1e041212b7 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_device.h
+++ b/src/gallium/state_trackers/wgl/shared/stw_device.h
@@ -35,6 +35,10 @@ struct stw_device
{
const struct stw_winsys *stw_winsys;
struct pipe_screen *screen;
+
+#ifdef DEBUG
+ unsigned long memdbg_no;
+#endif
};
diff --git a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c
index 84b7b287b91..5cfdd41597c 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c
@@ -25,7 +25,7 @@
*
**************************************************************************/
-#include "pipe/p_debug.h"
+#include "util/u_debug.h"
#include "stw_pixelformat.h"
#include "stw_public.h"
diff --git a/src/gallium/state_trackers/wgl/wgl/stw_wgl.c b/src/gallium/state_trackers/wgl/wgl/stw_wgl.c
index f50b79b4e11..d7077ca5d4d 100644
--- a/src/gallium/state_trackers/wgl/wgl/stw_wgl.c
+++ b/src/gallium/state_trackers/wgl/wgl/stw_wgl.c
@@ -27,7 +27,7 @@
#include <windows.h>
-#include "pipe/p_debug.h"
+#include "util/u_debug.h"
#include "shared/stw_public.h"
#include "stw_wgl.h"
#include "stw.h"