summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_debug_refcnt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util/u_debug_refcnt.h')
-rw-r--r--src/gallium/auxiliary/util/u_debug_refcnt.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.h b/src/gallium/auxiliary/util/u_debug_refcnt.h
index ba40999bf2..4c4a18ecf9 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.h
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.h
@@ -15,19 +15,26 @@
extern "C" {
#endif
+typedef void (*debug_reference_descriptor)(char*, const struct pipe_reference*);
+
#if defined(DEBUG) && (!defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_WINDOWS_USER))
+
extern int debug_refcnt_state;
-void debug_reference_slowpath(const struct pipe_reference* p, void* get_desc, int change);
+void debug_reference_slowpath(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change);
-static INLINE void debug_reference(const struct pipe_reference* p, void* get_desc, int change)
+static INLINE void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
{
- if(debug_refcnt_state >= 0)
- debug_reference_slowpath(p, get_desc, change);
+ if (debug_refcnt_state >= 0)
+ debug_reference_slowpath(p, get_desc, change);
}
+
#else
-static INLINE void debug_reference(const struct pipe_reference* p, void* get_desc, const char* op)
-{}
+
+static INLINE void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
+{
+}
+
#endif
#ifdef __cplusplus