From 716ce3cc1aaa1a9013ab08694a5a6ffdf63f3f4b Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Fri, 16 Apr 2021 09:48:58 +1200 Subject: [PATCH] panfrost: Assert staging resource allocation was successful Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index df8da26..c4748b2 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -824,6 +824,7 @@ panfrost_ptr_map(struct pipe_context *pctx, /* We don't have s/w routines for AFBC, so use a staging texture */ if (drm_is_afbc(rsrc->image.layout.modifier)) { struct panfrost_resource *staging = pan_alloc_staging(ctx, rsrc, level, box); + assert(staging); /* Staging resources have one LOD: level 0. Query the strides * on this LOD. -- 2.7.4