summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_dump.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-03-30 14:11:12 +0200
committerNicolai Hähnle <[email protected]>2017-03-31 18:15:47 +0200
commitc22841d8d20c7d981ba8bbfd10300952586a6b69 (patch)
treeb4ef3e4b944dbde5bd0bef812e5ded9f7a90c4b8 /src/gallium/auxiliary/tgsi/tgsi_dump.c
parent74a80d579d2adc99c88a61a9d17387df8ae70460 (diff)
tgsi: fix printing of 64-bit integer immediates
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_dump.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 14911c481da..6c0fcf8572b 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -25,6 +25,8 @@
*
**************************************************************************/
+#include <inttypes.h>
+
#include "util/u_debug.h"
#include "util/u_string.h"
#include "util/u_math.h"
@@ -87,6 +89,8 @@ dump_enum(
#define CHR(C) ctx->dump_printf( ctx, "%c", C )
#define UIX(I) ctx->dump_printf( ctx, "0x%x", I )
#define UID(I) ctx->dump_printf( ctx, "%u", I )
+#define SI64D(I) ctx->dump_printf( ctx, "%"PRId64, I )
+#define UI64D(I) ctx->dump_printf( ctx, "%"PRIu64, I )
#define INSTID(I) ctx->dump_printf( ctx, "% 3u", I )
#define SID(I) ctx->dump_printf( ctx, "%d", I )
#define FLT(F) ctx->dump_printf( ctx, "%10.4f", F )
@@ -257,14 +261,14 @@ dump_imm_data(struct tgsi_iterate_context *iter,
case TGSI_IMM_INT64: {
union di d;
d.i = data[i].Uint | (uint64_t)data[i+1].Uint << 32;
- UID( d.i );
+ SI64D( d.i );
i++;
break;
}
case TGSI_IMM_UINT64: {
union di d;
d.ui = data[i].Uint | (uint64_t)data[i+1].Uint << 32;
- UID( d.ui );
+ UI64D( d.ui );
i++;
break;
}