From: Erik Faye-Lund Date: Tue, 26 Mar 2019 21:07:47 +0000 (+0100) Subject: zink: add curr_cmdbuf-helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e2ad61ef1b085642bbb49297b4308758d9b892a;p=mesa.git zink: add curr_cmdbuf-helper Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index c868e7c98d6..13e630ca65b 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -994,7 +994,7 @@ zink_flush(struct pipe_context *pctx, if (pfence) zink_fence_reference(zink_screen(pctx->screen), (struct zink_fence **)pfence, - ctx->cmdbufs[0].fence); + zink_context_curr_cmdbuf(ctx)->fence); } static void diff --git a/src/gallium/drivers/zink/zink_context.h b/src/gallium/drivers/zink/zink_context.h index 629321c72ba..ed5fe183f65 100644 --- a/src/gallium/drivers/zink/zink_context.h +++ b/src/gallium/drivers/zink/zink_context.h @@ -105,6 +105,12 @@ zink_context(struct pipe_context *context) return (struct zink_context *)context; } +static inline struct zink_cmdbuf * +zink_context_curr_cmdbuf(struct zink_context *ctx) +{ + return ctx->cmdbufs + 0; +} + void zink_resource_barrier(VkCommandBuffer cmdbuf, struct zink_resource *res, VkImageAspectFlags aspect, VkImageLayout new_layout);