mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
panfrost: fix null deref when no color buffer is attached
Do not dereference color buffer #0 in the SFBD code path if no color buffer is
attached, as with depth-only attachments. Fixes a crash running glmark2 -b
shadow on Mali T720.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Fixes: c746747cb8 ("panfrost: fix GL_EXT_multisampled_render_to_texture regression")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12927>
This commit is contained in:
parent
bdb37c862f
commit
7682a5de04
1 changed files with 2 additions and 2 deletions
|
|
@ -793,8 +793,8 @@ pan_emit_sfbd(const struct panfrost_device *dev,
|
|||
|
||||
cfg.sample_count = fb->nr_samples;
|
||||
|
||||
/* XXX: different behaviour from MFBD and probably wrong... */
|
||||
cfg.msaa = mali_sampling_mode(fb->rts[0].view);
|
||||
if (fb->rt_count)
|
||||
cfg.msaa = mali_sampling_mode(fb->rts[0].view);
|
||||
}
|
||||
pan_emit_sfbd_tiler(dev, fb, tiler_ctx, fbd);
|
||||
pan_section_pack(fbd, SINGLE_TARGET_FRAMEBUFFER, PADDING_2, padding);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue