Mesa (master): panfrost/decode: Show int uniforms

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 20 14:49:18 UTC 2019


Module: Mesa
Branch: master
Commit: 0021fae7f80801d46e1ed019201303f56fd1d4c9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0021fae7f80801d46e1ed019201303f56fd1d4c9

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Wed Jun 19 08:59:23 2019 -0700

panfrost/decode: Show int uniforms

Float is ambiguous.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/pandecode/decode.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pandecode/decode.c b/src/gallium/drivers/panfrost/pandecode/decode.c
index 3757ee9dd4f..7b8b2c87f7e 100644
--- a/src/gallium/drivers/panfrost/pandecode/decode.c
+++ b/src/gallium/drivers/panfrost/pandecode/decode.c
@@ -1529,15 +1529,19 @@ pandecode_replay_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix
 
                 struct pandecode_mapped_memory *uniform_mem = pandecode_find_mapped_gpu_mem_containing(p->uniforms);
                 pandecode_fetch_gpu_mem(uniform_mem, p->uniforms, sz);
-                float *PANDECODE_PTR_VAR(uniforms, uniform_mem, p->uniforms);
+                u32 *PANDECODE_PTR_VAR(uniforms, uniform_mem, p->uniforms);
 
-                pandecode_log("float uniforms_%d%s[] = {\n", job_no, suffix);
+                pandecode_log("u32 uniforms_%d%s[] = {\n", job_no, suffix);
 
                 pandecode_indent++;
 
                 for (int row = 0; row < rows; row++) {
-                        for (int i = 0; i < width; i++)
-                                pandecode_log_cont("%ff, ", uniforms[i]);
+                        for (int i = 0; i < width; i++) {
+                                u32 v = uniforms[i];
+                                float f;
+                                memcpy(&f, &v, sizeof(v));
+                                pandecode_log_cont("%X /* %f */, ", v, f);
+                        }
 
                         pandecode_log_cont("\n");
 




More information about the mesa-commit mailing list