zink: store context to batch state

this will be used for post-flush device resets when device is lost

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
This commit is contained in:
Mike Blumenkrantz 2021-03-22 11:09:18 -04:00 committed by Marge Bot
parent ba6265a1ff
commit 3a344174dc
2 changed files with 3 additions and 0 deletions

View file

@ -158,6 +158,8 @@ create_batch_state(struct zink_context *ctx)
if (!ptr) \
goto fail
bs->ctx = ctx;
SET_CREATE_OR_FAIL(bs->fbs);
SET_CREATE_OR_FAIL(bs->fence.resources);
SET_CREATE_OR_FAIL(bs->surfaces);

View file

@ -51,6 +51,7 @@ struct zink_batch_usage {
struct zink_batch_state {
struct zink_fence fence;
struct zink_context *ctx;
VkCommandPool cmdpool;
VkCommandBuffer cmdbuf;