panfrost: fix crash when disassembling shader for trace

During disassembly triggered by PAN_MESA_DEBUG=trace,
the upper bits of the blend shader address are set from the passed
in frag_shader. However, this is 0 for some blend shaders. In this case,
skip the blend shader disassembly.

This fixes a failing assert at line 86 of panfrost/lib/genxml/decode.h.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30603>
This commit is contained in:
Eric R. Smith
2024-08-11 18:28:57 +00:00
committed by Marge Bot
parent 1ae8ac35c0
commit 0598fc4419
+6
View File
@@ -213,6 +213,12 @@ GENX(pandecode_blend)(struct pandecode_context *ctx, void *descs, int rt_no,
#if PAN_ARCH >= 6
if (b.internal.mode != MALI_BLEND_MODE_SHADER)
return 0;
/* If we don't have a frag shader, we can't extract the LSB of the blend
* shader so return NULL in that case. It doesn't matter, because the
* blend shader won't be executed anyway, so disassembling is not
* super useful. */
if (!frag_shader)
return 0;
return (frag_shader & 0xFFFFFFFF00000000ULL) | b.internal.shader.pc;
#else