zink: use helper
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 20 Jun 2019 09:31:40 +0000 (11:31 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:45 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/zink_context.c

index fde12a9dd74016326edc8e0e2dfa93eca45dac26..f6bf504cf714f568f39777c7f336d4863265c3dd 100644 (file)
@@ -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 &&