mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
nvk: Allocate a zcull save region in fewer cases
Reviewed-by: Mary Guillemard <mary@mary.zone> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41275>
This commit is contained in:
parent
d4eb5c76c9
commit
cb29829f72
1 changed files with 15 additions and 0 deletions
|
|
@ -1056,12 +1056,27 @@ nvk_image_init(struct nvk_device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
const VkImageUsageFlagBits READ_ONLY_IMAGE_USAGE =
|
||||
VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
|
||||
VK_IMAGE_USAGE_SAMPLED_BIT |
|
||||
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
|
||||
|
||||
/*
|
||||
* We don't know how to update the zcull data if the image is written
|
||||
* as anything other than a depth attachment
|
||||
*/
|
||||
const VkImageUsageFlagBits ZCULL_COMPATIBLE_IMAGE_USAGE =
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | READ_ONLY_IMAGE_USAGE;
|
||||
|
||||
/* Disable zcull save/restore regions until
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15221
|
||||
* is fixed.
|
||||
*/
|
||||
if (false &&
|
||||
(image->vk.aspects & VK_IMAGE_ASPECT_DEPTH_BIT) &&
|
||||
(image->vk.usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) &&
|
||||
!(image->vk.usage & ~ZCULL_COMPATIBLE_IMAGE_USAGE) &&
|
||||
!(image->vk.create_flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) &&
|
||||
image->vk.image_type != VK_IMAGE_TYPE_3D &&
|
||||
image->vk.tiling == VK_IMAGE_TILING_OPTIMAL &&
|
||||
pdev->info.has_zcull_info) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue