From 795c0e95c508e1b9dd56a58857af81a293c23e36 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 20 Jun 2019 11:31:40 +0200 Subject: [PATCH] zink: use helper Acked-by: Jordan Justen --- src/gallium/drivers/zink/zink_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index fde12a9dd74..f6bf504cf71 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -956,7 +956,8 @@ zink_draw_vbo(struct pipe_context *pctx, } else { struct pipe_sampler_view *psampler_view = ctx->image_views[i][index]; assert(psampler_view); - struct zink_sampler_view *sampler_view = (struct zink_sampler_view *)psampler_view; + struct zink_sampler_view *sampler_view = zink_sampler_view(psampler_view); + struct zink_resource *res = zink_resource(psampler_view->texture); VkImageLayout layout = res->layout; if (layout != VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL && -- 2.30.2