diff options
author | Nanley Chery <[email protected]> | 2017-01-11 13:05:13 -0800 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2017-01-12 20:52:20 -0800 |
commit | 462a4c96487b3bf36119bdfaee2bdacb835e4100 (patch) | |
tree | 83561ce81ea56f7218cda123a97fd62e8315fa0f /src/intel | |
parent | d16871d9580152c5a041e9d54165f54f366ebb45 (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.c | 27 |
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 |