mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
panfrost: Fix NULL deref in pan_sfbd
The last of the nr_cbufs audit changes. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
This commit is contained in:
parent
a124c47b9f
commit
76fb3961b1
1 changed files with 1 additions and 1 deletions
|
|
@ -221,7 +221,7 @@ panfrost_sfbd_fragment(struct panfrost_batch *batch, bool has_draws)
|
|||
|
||||
/* SFBD does not support MRT natively; sanity check */
|
||||
assert(batch->key.nr_cbufs <= 1);
|
||||
if (batch->key.nr_cbufs) {
|
||||
if (batch->key.nr_cbufs && batch->key.cbufs[0]) {
|
||||
struct pipe_surface *surf = batch->key.cbufs[0];
|
||||
struct panfrost_resource *rsrc = pan_resource(surf->texture);
|
||||
struct panfrost_bo *bo = rsrc->bo;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue