vk/image: Add qpitch fields to anv_depth_stencil_view
authorChad Versace <chad.versace@intel.com>
Fri, 26 Jun 2015 02:46:42 +0000 (19:46 -0700)
committerChad Versace <chad.versace@intel.com>
Fri, 26 Jun 2015 03:10:16 +0000 (20:10 -0700)
For now, hard-code them to 0.

src/vulkan/device.c
src/vulkan/image.c
src/vulkan/private.h

index 3c5691f3cb3d3a71f2ac55e4c6499d1a64d7001d..e637d2064ec0eda09e60c94816db795e257cfd84 100644 (file)
@@ -3779,7 +3779,7 @@ anv_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer,
                   .MinimumArrayElement = 0,
                   .DepthBufferObjectControlState = GEN8_MOCS,
                   .RenderTargetViewExtent = 1 - 1,
-                  .SurfaceQPitch = 0);
+                  .SurfaceQPitch = view->depth_qpitch >> 2);
 
    /* Disable hierarchial depth buffers. */
    anv_batch_emit(&cmd_buffer->batch, GEN8_3DSTATE_HIER_DEPTH_BUFFER);
@@ -3789,7 +3789,7 @@ anv_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer,
                   .StencilBufferObjectControlState = GEN8_MOCS,
                   .SurfacePitch = view->stencil_stride > 0 ? view->stencil_stride - 1 : 0,
                   .SurfaceBaseAddress = { view->bo, view->stencil_offset },
-                  .SurfaceQPitch = 0);
+                  .SurfaceQPitch = view->stencil_qpitch >> 2);
 
    /* Clear the clear params. */
    anv_batch_emit(&cmd_buffer->batch, GEN8_3DSTATE_CLEAR_PARAMS);
index 5999318baaaa3175f6a83f167bf7e876dbebe541..f3487302f288f57e617538f25fd140e4ec82f404 100644 (file)
@@ -487,9 +487,11 @@ VkResult anv_CreateDepthStencilView(
    view->depth_stride = image->stride;
    view->depth_offset = image->offset;
    view->depth_format = format->depth_format;
+   view->depth_qpitch = 0; /* FINISHME: QPitch */
 
    view->stencil_stride = image->stencil_stride;
    view->stencil_offset = image->offset + image->stencil_offset;
+   view->stencil_qpitch = 0; /* FINISHME: QPitch */
 
    *pView = (VkDepthStencilView) view;
 
index 397881f75a4c877064a70f77da8024658390726b..353a51401eb5978cdee9aec463b22e0906228c07 100644 (file)
@@ -863,9 +863,11 @@ struct anv_depth_stencil_view {
    uint32_t depth_offset; /**< Offset into bo. */
    uint32_t depth_stride; /**< 3DSTATE_DEPTH_BUFFER.SurfacePitch */
    uint32_t depth_format; /**< 3DSTATE_DEPTH_BUFFER.SurfaceFormat */
+   uint16_t depth_qpitch; /**< 3DSTATE_DEPTH_BUFFER.SurfaceQPitch */
 
    uint32_t stencil_offset; /**< Offset into bo. */
    uint32_t stencil_stride; /**< 3DSTATE_STENCIL_BUFFER.SurfacePitch */
+   uint16_t stencil_qpitch; /**< 3DSTATE_DEPTH_BUFFER.SurfaceQPitch */
 };
 
 struct anv_framebuffer {