tgsi: fix printing of 64-bit integer immediates

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle 2017-03-30 14:11:12 +02:00
parent 74a80d579d
commit c22841d8d2
3 changed files with 11 additions and 5 deletions

View file

@ -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;
}

View file

@ -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] =

View file

@ -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];