From ae84f167869baac1f69af5bbc4303244b0622000 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 22 Aug 2019 11:30:13 -0700 Subject: [PATCH] pan/decode: Print stub for uniforms We don't need to dump the contents necessary, but having the stub with the address is useful. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/pandecode/decode.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 5d689711a7b..3b826f39a38 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -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) -- 2.30.2