pan/decode: Don't crash on missing payload
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 30 Apr 2020 20:49:31 +0000 (16:49 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 May 2020 00:27:23 +0000 (00:27 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844>

src/panfrost/pandecode/decode.c

index eff8b47aa39c71826a2adaf0535bb80ff2e95fdf..48b179ab69e977553d65ead5230e4322a9825cf3 100644 (file)
@@ -2288,9 +2288,11 @@ pandecode_bifrost_texture(
         pandecode_log_cont("\n");
 
         struct pandecode_mapped_memory *tmem = pandecode_find_mapped_gpu_mem_containing(t->payload);
-        pandecode_texture_payload(t->payload, t->type, t->layout,
-                                  true, t->levels, t->depth,
-                                  t->array_size, tmem);
+        if (t->payload) {
+                pandecode_texture_payload(t->payload, t->type, t->layout,
+                                          true, t->levels, t->depth,
+                                          t->array_size, tmem);
+        }
 
         pandecode_indent--;
         pandecode_log("};\n");