v3d: Use the uniform pretty-printer in v3d_write_uniforms()'s debug code.
authorEric Anholt <eric@anholt.net>
Wed, 12 Dec 2018 06:43:56 +0000 (22:43 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 15 Dec 2018 01:48:01 +0000 (17:48 -0800)
This will be a lot easier than my usual "38400.000000?  that looks like a
viewport scale" decoding strategy.

src/gallium/drivers/v3d/v3d_uniforms.c

index eb8dffa185f76476212682bec0a05661d9430d67..bc680af0956284f2b0519c7c2207427405d3d242 100644 (file)
@@ -303,9 +303,11 @@ v3d_write_uniforms(struct v3d_context *v3d, struct v3d_compiled_shader *shader,
                 }
 #if 0
                 uint32_t written_val = *((uint32_t *)uniforms - 1);
-                fprintf(stderr, "shader %p[%d]: 0x%08x / 0x%08x (%f)\n",
+                fprintf(stderr, "shader %p[%d]: 0x%08x / 0x%08x (%f) ",
                         shader, i, __gen_address_offset(&uniform_stream) + i * 4,
                         written_val, uif(written_val));
+                vir_dump_uniform(uinfo->contents[i], data);
+                fprintf(stderr, "\n");
 #endif
         }