vk/image: Add qpitch fields to anv_depth_stencil_view

For now, hard-code them to 0.
This commit is contained in:
Chad Versace
2015-06-25 19:46:42 -07:00
parent b91a76de98
commit 7ea707a42a
3 changed files with 6 additions and 2 deletions

View File

@@ -3779,7 +3779,7 @@ anv_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer,
.MinimumArrayElement = 0, .MinimumArrayElement = 0,
.DepthBufferObjectControlState = GEN8_MOCS, .DepthBufferObjectControlState = GEN8_MOCS,
.RenderTargetViewExtent = 1 - 1, .RenderTargetViewExtent = 1 - 1,
.SurfaceQPitch = 0); .SurfaceQPitch = view->depth_qpitch >> 2);
/* Disable hierarchial depth buffers. */ /* Disable hierarchial depth buffers. */
anv_batch_emit(&cmd_buffer->batch, GEN8_3DSTATE_HIER_DEPTH_BUFFER); 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, .StencilBufferObjectControlState = GEN8_MOCS,
.SurfacePitch = view->stencil_stride > 0 ? view->stencil_stride - 1 : 0, .SurfacePitch = view->stencil_stride > 0 ? view->stencil_stride - 1 : 0,
.SurfaceBaseAddress = { view->bo, view->stencil_offset }, .SurfaceBaseAddress = { view->bo, view->stencil_offset },
.SurfaceQPitch = 0); .SurfaceQPitch = view->stencil_qpitch >> 2);
/* Clear the clear params. */ /* Clear the clear params. */
anv_batch_emit(&cmd_buffer->batch, GEN8_3DSTATE_CLEAR_PARAMS); anv_batch_emit(&cmd_buffer->batch, GEN8_3DSTATE_CLEAR_PARAMS);

View File

@@ -487,9 +487,11 @@ VkResult anv_CreateDepthStencilView(
view->depth_stride = image->stride; view->depth_stride = image->stride;
view->depth_offset = image->offset; view->depth_offset = image->offset;
view->depth_format = format->depth_format; view->depth_format = format->depth_format;
view->depth_qpitch = 0; /* FINISHME: QPitch */
view->stencil_stride = image->stencil_stride; view->stencil_stride = image->stencil_stride;
view->stencil_offset = image->offset + image->stencil_offset; view->stencil_offset = image->offset + image->stencil_offset;
view->stencil_qpitch = 0; /* FINISHME: QPitch */
*pView = (VkDepthStencilView) view; *pView = (VkDepthStencilView) view;

View File

@@ -863,9 +863,11 @@ struct anv_depth_stencil_view {
uint32_t depth_offset; /**< Offset into bo. */ uint32_t depth_offset; /**< Offset into bo. */
uint32_t depth_stride; /**< 3DSTATE_DEPTH_BUFFER.SurfacePitch */ uint32_t depth_stride; /**< 3DSTATE_DEPTH_BUFFER.SurfacePitch */
uint32_t depth_format; /**< 3DSTATE_DEPTH_BUFFER.SurfaceFormat */ 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_offset; /**< Offset into bo. */
uint32_t stencil_stride; /**< 3DSTATE_STENCIL_BUFFER.SurfacePitch */ uint32_t stencil_stride; /**< 3DSTATE_STENCIL_BUFFER.SurfacePitch */
uint16_t stencil_qpitch; /**< 3DSTATE_DEPTH_BUFFER.SurfaceQPitch */
}; };
struct anv_framebuffer { struct anv_framebuffer {