zink: fail if set failed to create

Fixes: a03d17ede7 ("zink: refcount zink_gfx_program objects")

Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7985>
(cherry picked from commit 8a30ac49ac)
This commit is contained in:
Erik Faye-Lund 2020-12-08 12:45:23 +01:00 committed by Dylan Baker
parent bd01bc1f68
commit bd7ccbf214
2 changed files with 3 additions and 2 deletions

View file

@ -175,7 +175,7 @@
"description": "zink: fail if set failed to create",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "a03d17ede778610f2c66099d0d5342cf09ef12a2"
},

View file

@ -1304,7 +1304,8 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
_mesa_hash_pointer,
_mesa_key_pointer_equal);
if (!ctx->batches[i].resources || !ctx->batches[i].sampler_views)
if (!ctx->batches[i].resources || !ctx->batches[i].sampler_views ||
!ctx->batches[i].programs)
goto fail;
util_dynarray_init(&ctx->batches[i].zombie_samplers, NULL);