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

Author: Alyssa Rosenzweig <[email protected]>
Date:   Thu Apr 30 16:49:31 2020 -0400

pan/decode: Don't crash on missing payload

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844>

---

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

diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index eff8b47aa39..48b179ab69e 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -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");

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to