diff options
author | Nicolai Hähnle <[email protected]> | 2017-03-30 14:11:12 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-03-31 18:15:47 +0200 |
commit | c22841d8d20c7d981ba8bbfd10300952586a6b69 (patch) | |
tree | b4ef3e4b944dbde5bd0bef812e5ded9f7a90c4b8 /src/gallium | |
parent | 74a80d579d2adc99c88a61a9d17387df8ae70460 (diff) |
tgsi: fix printing of 64-bit integer immediates
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_dump.c | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_strings.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_strings.h | 2 |
3 files changed, 11 insertions, 5 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; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c index cebc1b49d98..d7201fc5069 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_strings.c +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c @@ -207,12 +207,14 @@ const char *tgsi_fs_coord_pixel_center_names[2] = "INTEGER" }; -const char *tgsi_immediate_type_names[4] = +const char *tgsi_immediate_type_names[6] = { "FLT32", "UINT32", "INT32", - "FLT64" + "FLT64", + "UINT64", + "INT64", }; const char *tgsi_memory_names[3] = diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.h b/src/gallium/auxiliary/tgsi/tgsi_strings.h index 9a9362e9185..bb2d3458dde 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_strings.h +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.h @@ -58,7 +58,7 @@ extern const char *tgsi_fs_coord_origin_names[2]; extern const char *tgsi_fs_coord_pixel_center_names[2]; -extern const char *tgsi_immediate_type_names[4]; +extern const char *tgsi_immediate_type_names[6]; extern const char *tgsi_memory_names[3]; |