pan/decode: Print stub for uniforms
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 22 Aug 2019 18:30:13 +0000 (11:30 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 22 Aug 2019 20:31:06 +0000 (13:31 -0700)
We don't need to dump the contents necessary, but having the stub with
the address is useful.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/pandecode/decode.c

index 5d689711a7b74b1fee774997ce083bf5c13505b0..3b826f39a38a86cc66d1b80953cde188f290be97 100644 (file)
@@ -1703,6 +1703,16 @@ pandecode_uniform_buffers(mali_ptr pubufs, int ubufs_count, int job_no)
         pandecode_log("\n");
 }
 
+static void
+pandecode_uniforms(mali_ptr uniforms, unsigned uniform_count)
+{
+        pandecode_validate_buffer(uniforms, uniform_count * 16);
+
+        char *ptr = pointer_as_memory_reference(uniforms);
+        pandecode_log("vec4 uniforms[%u] = %s;\n", uniform_count, ptr);
+        free(ptr);
+}
+
 static void
 pandecode_scratchpad(uintptr_t pscratchpad, int job_no, char *suffix)
 {
@@ -2248,7 +2258,7 @@ pandecode_vertex_tiler_postfix_pre(
 
         if (p->uniforms) {
                 if (uniform_count)
-                        pandecode_validate_buffer(p->uniforms, uniform_count * 16);
+                        pandecode_uniforms(p->uniforms, uniform_count);
                 else
                         pandecode_msg("warn: Uniforms specified but not referenced\n");
         } else if (uniform_count)