iris: Don't leak the surface if uncompressed re-interp fails
Fixes: a032a9665f
"iris: Enable PIPE_CAP_SURFACE_REINTERPRET_BLOCKS"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>
This commit is contained in:
parent
9946120d2b
commit
98faa09bb5
|
@ -2639,8 +2639,10 @@ iris_create_surface(struct pipe_context *ctx,
|
||||||
*
|
*
|
||||||
* Return NULL to force gallium frontends to take fallback paths.
|
* Return NULL to force gallium frontends to take fallback paths.
|
||||||
*/
|
*/
|
||||||
if (view->array_len > 1 || GFX_VER == 8)
|
if (view->array_len > 1 || GFX_VER == 8) {
|
||||||
|
free(surf);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
const bool is_3d = res->surf.dim == ISL_SURF_DIM_3D;
|
const bool is_3d = res->surf.dim == ISL_SURF_DIM_3D;
|
||||||
isl_surf_get_image_surf(&screen->isl_dev, &res->surf,
|
isl_surf_get_image_surf(&screen->isl_dev, &res->surf,
|
||||||
|
|
Loading…
Reference in New Issue