aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-10-22 17:38:55 +0200
committerNicolai Hähnle <[email protected]>2017-11-09 14:01:02 +0100
commit6f4a03b08acc58945d717324e88b3d2bcec5d354 (patch)
tree249f3b5e68ce71c1fbb6dece249c0ba23b003cd5 /src/gallium
parent125a915052757f906c872e3fa2952e455bb646f3 (diff)
gallium/u_dump: export util_dump_ptr
Change format to %p while we're at it. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_dump.h3
-rw-r--r--src/gallium/auxiliary/util/u_dump_state.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_dump.h b/src/gallium/auxiliary/util/u_dump.h
index 3fa253e511f..ff1325e1147 100644
--- a/src/gallium/auxiliary/util/u_dump.h
+++ b/src/gallium/auxiliary/util/u_dump.h
@@ -91,6 +91,9 @@ const char *
util_str_prim_mode(unsigned value, boolean shortened);
void
+util_dump_ptr(FILE *stream, const void *value);
+
+void
util_dump_query_type(FILE *stream, unsigned value);
void
diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c
index c263021a9f6..cef82a314f1 100644
--- a/src/gallium/auxiliary/util/u_dump_state.c
+++ b/src/gallium/auxiliary/util/u_dump_state.c
@@ -142,11 +142,11 @@ util_dump_null(FILE *stream)
fputs("NULL", stream);
}
-static void
+void
util_dump_ptr(FILE *stream, const void *value)
{
if(value)
- util_stream_writef(stream, "0x%08lx", (unsigned long)(uintptr_t)value);
+ util_stream_writef(stream, "%p", value);
else
util_dump_null(stream);
}