summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-02-01 17:18:41 -0800
committerEric Anholt <[email protected]>2019-02-05 15:42:14 -0800
commitd0fdbd42112d6fc1225061aa4c6d2bc0cf2ed8df (patch)
tree211cb0c427b55091689bf4539eac72ba7e2b0d8a /src
parentbdef17b052b9c4d2568544c1b745880f5db50f1d (diff)
v3d: Fix dumping of shaders with alpha test.
We were trying to print a NULL entry from the table.
Diffstat (limited to 'src')
-rw-r--r--src/broadcom/compiler/vir_dump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/broadcom/compiler/vir_dump.c b/src/broadcom/compiler/vir_dump.c
index ecf6f3e1fbe..b562fbf90e3 100644
--- a/src/broadcom/compiler/vir_dump.c
+++ b/src/broadcom/compiler/vir_dump.c
@@ -30,6 +30,7 @@ vir_dump_uniform(enum quniform_contents contents,
uint32_t data)
{
static const char *quniform_names[] = {
+ [QUNIFORM_ALPHA_REF] = "alpha_ref",
[QUNIFORM_VIEWPORT_X_SCALE] = "vp_x_scale",
[QUNIFORM_VIEWPORT_Y_SCALE] = "vp_y_scale",
[QUNIFORM_VIEWPORT_Z_OFFSET] = "vp_z_offset",
@@ -118,7 +119,8 @@ vir_dump_uniform(enum quniform_contents contents,
fprintf(stderr, "tex[%d].p0: 0x%08x",
contents - QUNIFORM_TEXTURE_CONFIG_P0_0,
data);
- } else if (contents < ARRAY_SIZE(quniform_names)) {
+ } else if (contents < ARRAY_SIZE(quniform_names) &&
+ quniform_names[contents]) {
fprintf(stderr, "%s",
quniform_names[contents]);
} else {