Mesa (master): pan/decode: Fix uninitialized variables

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 3 11:43:49 UTC 2019


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Fri Aug 30 17:00:09 2019 -0700

pan/decode: Fix uninitialized variables

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>

---

 src/panfrost/pandecode/decode.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index d0634c95720..aef69da1c48 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -639,7 +639,10 @@ pandecode_sfbd(uint64_t gpu_va, int job_no, bool is_fragment)
         struct pandecode_mapped_memory *mem = pandecode_find_mapped_gpu_mem_containing(gpu_va);
         const struct mali_single_framebuffer *PANDECODE_PTR_VAR(s, mem, (mali_ptr) gpu_va);
 
-        struct pandecode_fbd info;
+        struct pandecode_fbd info = {
+                .has_extra = false,
+                .rt_count = 1
+        };
 
         pandecode_log("struct mali_single_framebuffer framebuffer_%"PRIx64"_%d = {\n", gpu_va, job_no);
         pandecode_indent++;
@@ -653,7 +656,6 @@ pandecode_sfbd(uint64_t gpu_va, int job_no, bool is_fragment)
 
         info.width = s->width + 1;
         info.height = s->height + 1;
-        info.rt_count = 1;
 
         pandecode_prop("width = MALI_POSITIVE(%" PRId16 ")", info.width);
         pandecode_prop("height = MALI_POSITIVE(%" PRId16 ")", info.height);
@@ -1802,6 +1804,7 @@ pandecode_shader_disassemble(mali_ptr shader_ptr, int shader_no, int type,
                 stats.instruction_count = 0;
                 stats.bundle_count = 0;
                 stats.quadword_count = 0;
+                stats.helper_invocations = false;
         } else {
                 stats = disassemble_midgard(code, sz);
         }




More information about the mesa-commit mailing list