From: Erik Faye-Lund Date: Thu, 20 Jun 2019 09:31:40 +0000 (+0200) Subject: zink: use helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=795c0e95c508e1b9dd56a58857af81a293c23e36;p=mesa.git zink: use helper Acked-by: Jordan Justen --- 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 &&