summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2017-01-11 13:05:13 -0800
committerNanley Chery <[email protected]>2017-01-12 20:52:20 -0800
commit462a4c96487b3bf36119bdfaee2bdacb835e4100 (patch)
tree83561ce81ea56f7218cda123a97fd62e8315fa0f /src/intel
parentd16871d9580152c5a041e9d54165f54f366ebb45 (diff)
anv: Use the gen8 BLORP HiZ resolving function
Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 63f6be12a8e..74369f6ba1b 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -2248,8 +2248,15 @@ genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer,
cmd_buffer->state.dirty |= ANV_CMD_DIRTY_RENDER_TARGETS;
+ const struct anv_image_view *iview =
+ anv_cmd_buffer_get_depth_stencil_view(cmd_buffer);
+
+ if (iview) {
+ anv_gen8_hiz_op_resolve(cmd_buffer, iview->image,
+ BLORP_HIZ_OP_HIZ_RESOLVE);
+ }
+
cmd_buffer_emit_depth_stencil(cmd_buffer);
- genX(cmd_buffer_emit_hz_op)(cmd_buffer, BLORP_HIZ_OP_HIZ_RESOLVE);
anv_cmd_buffer_clear_subpass(cmd_buffer);
}
@@ -2281,7 +2288,14 @@ void genX(CmdNextSubpass)(
assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
- genX(cmd_buffer_emit_hz_op)(cmd_buffer, BLORP_HIZ_OP_DEPTH_RESOLVE);
+ const struct anv_image_view *iview =
+ anv_cmd_buffer_get_depth_stencil_view(cmd_buffer);
+
+ if (iview) {
+ anv_gen8_hiz_op_resolve(cmd_buffer, iview->image,
+ BLORP_HIZ_OP_DEPTH_RESOLVE);
+ }
+
anv_cmd_buffer_resolve_subpass(cmd_buffer);
genX(cmd_buffer_set_subpass)(cmd_buffer, cmd_buffer->state.subpass + 1);
}
@@ -2291,7 +2305,14 @@ void genX(CmdEndRenderPass)(
{
ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
- genX(cmd_buffer_emit_hz_op)(cmd_buffer, BLORP_HIZ_OP_DEPTH_RESOLVE);
+ const struct anv_image_view *iview =
+ anv_cmd_buffer_get_depth_stencil_view(cmd_buffer);
+
+ if (iview) {
+ anv_gen8_hiz_op_resolve(cmd_buffer, iview->image,
+ BLORP_HIZ_OP_DEPTH_RESOLVE);
+ }
+
anv_cmd_buffer_resolve_subpass(cmd_buffer);
#ifndef NDEBUG