summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-10-22 17:38:55 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-11-06 11:09:48 +0100
commitd2051a0ff10161eb4aa78d2cbbe047b773c02341 (patch)
tree3fa338db41701a48cf419122284974ea482c4b83
parent6c02068e261a9c4498151f0f979dee46b15a0e0d (diff)
gallium/u_dump: export util_dump_ptr
Change format to %p while we're at it. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-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 3fa253e511..ff1325e114 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 c263021a9f..cef82a314f 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);
}