summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_image.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2017-01-07 15:10:57 -0800
committerNanley Chery <[email protected]>2017-01-12 20:52:19 -0800
commit055ff2ec52143f9d9110a27cea046087de7a0cb5 (patch)
tree6581b1c665730edfaf2cb01c656dd2a2af9e3cc3 /src/intel/vulkan/anv_image.c
parent160a54810ebf05857ee46a5410b9893046357a1c (diff)
anv: Replace anv_image_has_hiz() with ISL_AUX_USAGE_HIZ
The helper doesn't provide additional functionality over the current infrastructure. v2: Add comment to anv_image::aux_usage (Jason Ekstrand) v3: Clarify comment for aux_usage (Jason Ekstrand) 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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index f262d8a5240..d8216291914 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -195,6 +195,7 @@ make_surface(const struct anv_device *dev,
isl_surf_get_hiz_surf(&dev->isl_dev, &image->depth_surface.isl,
&image->aux_surface.isl);
add_surface(image, &image->aux_surface);
+ image->aux_usage = ISL_AUX_USAGE_HIZ;
}
} else if (aspect == VK_IMAGE_ASPECT_COLOR_BIT && vk_info->samples == 1) {
if (!unlikely(INTEL_DEBUG & DEBUG_NO_RBC)) {
@@ -523,6 +524,11 @@ anv_CreateImageView(VkDevice _device,
iview->isl.usage = 0;
}
+ /* Sampling from HiZ is not yet enabled */
+ enum isl_aux_usage surf_usage = image->aux_usage;
+ if (surf_usage == ISL_AUX_USAGE_HIZ)
+ surf_usage = ISL_AUX_USAGE_NONE;
+
/* Input attachment surfaces for color or depth are allocated and filled
* out at BeginRenderPass time because they need compression information.
* Stencil image do not support compression so we just use the texture
@@ -540,7 +546,7 @@ anv_CreateImageView(VkDevice _device,
.surf = &surface->isl,
.view = &view,
.aux_surf = &image->aux_surface.isl,
- .aux_usage = image->aux_usage,
+ .aux_usage = surf_usage,
.mocs = device->default_mocs);
if (!device->info.has_llc)
@@ -564,7 +570,7 @@ anv_CreateImageView(VkDevice _device,
.surf = &surface->isl,
.view = &view,
.aux_surf = &image->aux_surface.isl,
- .aux_usage = image->aux_usage,
+ .aux_usage = surf_usage,
.mocs = device->default_mocs);
} else {
anv_fill_buffer_surface_state(device, iview->storage_surface_state,