mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 19:20:38 +01:00
zink: Use an intermediary variable for create_surface
Allows to NULL-check it afterwards. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
This commit is contained in:
parent
faaa65a1a3
commit
55cdde758c
1 changed files with 2 additions and 1 deletions
|
|
@ -355,7 +355,8 @@ zink_create_surface(struct pipe_context *pctx,
|
|||
if (!transient)
|
||||
return NULL;
|
||||
ivci.image = transient->obj->image;
|
||||
csurf->transient = wrap_surface(pctx, (struct pipe_surface*)create_surface(pctx, &transient->base.b, templ, &ivci, true));
|
||||
struct zink_surface *tsurf = create_surface(pctx, &transient->base.b, templ, &ivci, true);
|
||||
csurf->transient = wrap_surface(pctx, &tsurf->base);
|
||||
if (!csurf->transient) {
|
||||
pipe_resource_reference((struct pipe_resource**)&transient, NULL);
|
||||
pipe_surface_release(pctx, &psurf);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue