summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen7_cmd_buffer.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2015-08-28 07:46:16 -0700
committerChad Versace <[email protected]>2015-08-28 07:46:16 -0700
commit35b0262a2d80b8b21dfccaf9a099278d3f3f6a6c (patch)
tree06e84f848885e452a113e881464b4a255705359c /src/vulkan/gen7_cmd_buffer.c
parentb2ee317e24d9d236d0050b2a6188df379e913c45 (diff)
vk/gen7: Add func gen7_cmd_buffer_emit_depth_stencil()
This patch moves all the GEN7_3DSTATE_DEPTH_BUFFER code from gen7_cmd_buffer_begin_subpass() into a new function gen7_cmd_buffer_emit_depth_stencil().
Diffstat (limited to 'src/vulkan/gen7_cmd_buffer.c')
-rw-r--r--src/vulkan/gen7_cmd_buffer.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/vulkan/gen7_cmd_buffer.c b/src/vulkan/gen7_cmd_buffer.c
index 1028b6dae22..c157155cd99 100644
--- a/src/vulkan/gen7_cmd_buffer.c
+++ b/src/vulkan/gen7_cmd_buffer.c
@@ -525,17 +525,13 @@ void gen7_CmdPipelineBarrier(
stub();
}
-void
-gen7_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
- struct anv_subpass *subpass)
+static void
+gen7_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
{
+ struct anv_subpass *subpass = cmd_buffer->state.subpass;
struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
const struct anv_depth_stencil_view *view = NULL;
- cmd_buffer->state.subpass = subpass;
-
- cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_FRAGMENT_BIT;
-
if (subpass->depth_stencil_attachment != VK_ATTACHMENT_UNUSED) {
const struct anv_attachment_view *aview =
fb->attachments[subpass->depth_stencil_attachment];
@@ -606,6 +602,16 @@ gen7_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
anv_batch_emit(&cmd_buffer->batch, GEN7_3DSTATE_CLEAR_PARAMS);
}
+void
+gen7_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
+ struct anv_subpass *subpass)
+{
+ cmd_buffer->state.subpass = subpass;
+ cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_FRAGMENT_BIT;
+
+ gen7_cmd_buffer_emit_depth_stencil(cmd_buffer);
+}
+
static void
begin_render_pass(struct anv_cmd_buffer *cmd_buffer,
const VkRenderPassBeginInfo* pRenderPassBegin)