summaryrefslogtreecommitdiffstats
path: root/src/broadcom
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-12-04 15:01:58 -0800
committerEric Anholt <[email protected]>2018-12-07 16:48:23 -0800
commit1fc78ff3f1774d6c58f78e184f01b123cf854284 (patch)
tree89929fe7041150b3188dfa9d4b97167111b4ded1 /src/broadcom
parent5932575299d009665d382c5fd3d7425e12057320 (diff)
v3d: Simplify VIR uniform dumping using a temporary.
Diffstat (limited to 'src/broadcom')
-rw-r--r--src/broadcom/compiler/vir_dump.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/broadcom/compiler/vir_dump.c b/src/broadcom/compiler/vir_dump.c
index c43578302b5..f02413c6877 100644
--- a/src/broadcom/compiler/vir_dump.c
+++ b/src/broadcom/compiler/vir_dump.c
@@ -86,50 +86,41 @@ vir_print_reg(struct v3d_compile *c, const struct qinst *inst,
case QFILE_UNIF: {
enum quniform_contents contents = c->uniform_contents[reg.index];
+ uint32_t data = c->uniform_data[reg.index];
fprintf(stderr, "%s%d", files[reg.file], reg.index);
switch (contents) {
case QUNIFORM_CONSTANT:
- fprintf(stderr, " (0x%08x / %f)",
- c->uniform_data[reg.index],
- uif(c->uniform_data[reg.index]));
+ fprintf(stderr, " (0x%08x / %f)", data, uif(data));
break;
case QUNIFORM_UNIFORM:
- fprintf(stderr, " (push[%d])",
- c->uniform_data[reg.index]);
+ fprintf(stderr, " (push[%d])", data);
break;
case QUNIFORM_TEXTURE_CONFIG_P1:
- fprintf(stderr, " (tex[%d].p1)",
- c->uniform_data[reg.index]);
+ fprintf(stderr, " (tex[%d].p1)", data);
break;
case QUNIFORM_TEXTURE_WIDTH:
- fprintf(stderr, " (tex[%d].width)",
- c->uniform_data[reg.index]);
+ fprintf(stderr, " (tex[%d].width)", data);
break;
case QUNIFORM_TEXTURE_HEIGHT:
- fprintf(stderr, " (tex[%d].height)",
- c->uniform_data[reg.index]);
+ fprintf(stderr, " (tex[%d].height)", data);
break;
case QUNIFORM_TEXTURE_DEPTH:
- fprintf(stderr, " (tex[%d].depth)",
- c->uniform_data[reg.index]);
+ fprintf(stderr, " (tex[%d].depth)", data);
break;
case QUNIFORM_TEXTURE_ARRAY_SIZE:
- fprintf(stderr, " (tex[%d].array_size)",
- c->uniform_data[reg.index]);
+ fprintf(stderr, " (tex[%d].array_size)", data);
break;
case QUNIFORM_TEXTURE_LEVELS:
- fprintf(stderr, " (tex[%d].levels)",
- c->uniform_data[reg.index]);
+ fprintf(stderr, " (tex[%d].levels)", data);
break;
case QUNIFORM_UBO_ADDR:
- fprintf(stderr, " (ubo[%d])",
- c->uniform_data[reg.index]);
+ fprintf(stderr, " (ubo[%d])", data);
break;
default: