[Mesa-dev] [PATCH 10/18] anv/cmd_buffer: Remove extra resolve for certain depth buffers
Nanley Chery
nanleychery at gmail.com
Tue Feb 28 01:20:18 UTC 2017
Due to recent commits, the sampler now bypasses the auxiliary HiZ buffer
when reading from a depth image subresource that is in the general
layout. Remove this unneeded resolve.
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/intel/vulkan/genX_cmd_buffer.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 2cb4468696..3d521a01f7 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -355,27 +355,12 @@ transition_depth_buffer(struct anv_cmd_buffer *cmd_buffer,
hiz_op = BLORP_HIZ_OP_HIZ_RESOLVE;
} else {
assert(hiz_enabled == enable_hiz);
- /* If the same buffer will be used, no resolves are necessary except for
- * the special case noted below.
- */
+ /* If the same buffer will be used, no resolves are necessary. */
hiz_op = BLORP_HIZ_OP_NONE;
}
if (hiz_op != BLORP_HIZ_OP_NONE)
anv_gen8_hiz_op_resolve(cmd_buffer, image, hiz_op);
-
- /* Images that have sampling with HiZ enabled cause all shader sampling to
- * load data with the HiZ buffer. Therefore, in the case of transitioning to
- * the general layout - which currently routes all writes to the depth
- * buffer - we must ensure that the HiZ buffer remains consistent with the
- * depth buffer by performing an additional HIZ resolve if the operation
- * required by this transition was not already a HiZ resolve.
- */
- if (final_layout == VK_IMAGE_LAYOUT_GENERAL &&
- anv_can_sample_with_hiz(GEN_GEN, image->samples) &&
- hiz_op != BLORP_HIZ_OP_HIZ_RESOLVE) {
- anv_gen8_hiz_op_resolve(cmd_buffer, image, BLORP_HIZ_OP_HIZ_RESOLVE);
- }
}
--
2.11.1
More information about the mesa-dev
mailing list