aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_image.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2017-01-31 12:23:18 -0800
committerNanley Chery <[email protected]>2017-03-02 13:17:55 -0800
commitd7d64f1091006fb6faa48705c53f19ff5c657bc8 (patch)
treeb5a32298182570340c364930bc93b07661efd348 /src/intel/vulkan/anv_image.c
parent76b8cc2a1c60eafb50434e41e95a801b43d58688 (diff)
anv/image: Allow HiZ on input attachment-capable depth/stencil images
While an input attachment may only take on one of those two layouts, other depth/stencil attachments that use the same image may have HiZ-enabled layouts. Improves the average frame rate on a release candidate of a proprietary Vulkan benchmark by 9.94% over 3 runs on my SKL GT4. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_image.c')
-rw-r--r--src/intel/vulkan/anv_image.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 95ba12c928d..59f730c7c60 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -190,20 +190,6 @@ make_surface(const struct anv_device *dev,
*/
if (!(image->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)) {
/* It will never be used as an attachment, HiZ is pointless. */
- } else if (image->usage & VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT) {
- /* From the 1.0.37 spec:
- *
- * "An attachment used as an input attachment and depth/stencil
- * attachment must be in either VK_IMAGE_LAYOUT_GENERAL or
- * VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL."
- *
- * It will never have a layout of
- * VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, so HiZ is
- * currently pointless. If transfer operations learn to use the HiZ
- * buffer, we can enable HiZ for VK_IMAGE_LAYOUT_GENERAL and support
- * input attachments.
- */
- anv_finishme("Implement HiZ for input attachments");
} else if (!env_var_as_boolean("INTEL_VK_HIZ", dev->info.gen >= 8)) {
anv_finishme("Implement gen7 HiZ");
} else if (vk_info->mipLevels > 1) {