mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
pan/blit: Fix a NULL dereference in the preload path
The ZS view can be NULL if a stencil-only buffer is attached to the FB.
Fixes: 1de393fec5 ("panfrost: Fix ZS reloading on Bifrost v6")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>
This commit is contained in:
parent
2dd13257c8
commit
9f4dab0f2d
1 changed files with 3 additions and 1 deletions
|
|
@ -1132,7 +1132,9 @@ pan_preload_emit_pre_frame_dcd(struct pan_pool *desc_pool,
|
|||
|
||||
pan_preload_emit_dcd(desc_pool, fb, zs, coords, tsd, rsd, dcd, always_write);
|
||||
if (zs) {
|
||||
enum pipe_format fmt = fb->zs.view.zs->image->layout.format;
|
||||
enum pipe_format fmt = fb->zs.view.zs ?
|
||||
fb->zs.view.zs->image->layout.format :
|
||||
fb->zs.view.s->image->layout.format;
|
||||
bool always = false;
|
||||
|
||||
/* If we're dealing with a combined ZS resource and only one
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue