diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-17 15:43:24 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-18 10:42:43 -0700 |
commit | 479185a1cdc305be7947f1b364ee1da40d36b66f (patch) | |
tree | 24f5edc94336b62754041305b4fbeec594be1d77 /src | |
parent | 65d89097b8bbf23d305c7d488e6a4a140ce03a91 (diff) |
panfrost/decode: Don't disassemble NULL shaders
It is legal to load a shader from a NULL address, particularly when the
TILER job is used strictly for effects on the Z/S buffer with 0x0 color
mask. Don't crash the decoder in this case.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/pandecode/decode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 4eaf09fd342..4132dc530ee 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -1603,12 +1603,13 @@ pandecode_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix *p, else shader = pandecode_midgard_blend_mrt(blend_base, job_no, i); - if (shader) + if (shader & ~0xF) pandecode_shader_disassemble(shader, job_no, job_type, false); } } - pandecode_shader_disassemble(shader_ptr, job_no, job_type, is_bifrost); + if (shader_ptr & ~0xF) + pandecode_shader_disassemble(shader_ptr, job_no, job_type, is_bifrost); } else pandecode_msg("<no shader>\n"); |