aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-08 09:23:29 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-09 11:50:45 -0700
commit5ad83015cd3c6df7434e69a954bf4e2a950357ba (patch)
tree89dd3cdaeed65dfbc85437cc827481cbfbadca69 /src
parentc0ab268f9c2f5a608eaa5102a0aca4ba34c85a1a (diff)
pan/decode: Resolve crash with NULL attr/varyings
This case needs more investigation, but this was found with geometry shaders. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/pandecode/decode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 78f6da6e56c..60adec59699 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -995,6 +995,11 @@ pandecode_attributes(const struct pandecode_mapped_memory *mem,
{
char *prefix = varying ? "varyings" : "attributes";
+ if (!addr) {
+ pandecode_msg("no %s\n", prefix);
+ return;
+ }
+
union mali_attr *attr = pandecode_fetch_gpu_mem(mem, addr, sizeof(union mali_attr) * count);
char base[128];