From c22841d8d20c7d981ba8bbfd10300952586a6b69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Thu, 30 Mar 2017 14:11:12 +0200 Subject: [PATCH] tgsi: fix printing of 64-bit integer immediates MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/gallium/auxiliary/tgsi/tgsi_dump.c | 8 ++++++-- src/gallium/auxiliary/tgsi/tgsi_strings.c | 6 ++++-- 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 + #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]; -- 2.30.2