texture_cache: detiler: redundant flag removed

This commit is contained in:
psucien 2024-06-07 00:12:15 +02:00
parent cb07778008
commit b17b4ab787
3 changed files with 3 additions and 5 deletions

View File

@ -186,7 +186,6 @@ Image::Image(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_,
if (info.is_tiled) {
ImageViewInfo view_info;
view_info.format = DemoteImageFormatForDetiling(info.pixel_format);
view_info.used_for_detiling = true;
view_for_detiler.emplace(*instance, view_info, image);
}

View File

@ -24,7 +24,6 @@ struct ImageViewInfo {
vk::Format format = vk::Format::eR8G8B8A8Unorm;
SubresourceRange range;
vk::ComponentMapping mapping{};
bool used_for_detiling = false;
auto operator<=>(const ImageViewInfo&) const = default;
};

View File

@ -146,10 +146,10 @@ ImageView& TextureCache::RegisterImageView(Image& image, const ImageViewInfo& vi
}
// All tiled images are created with storage usage flag. This makes set of formats (e.g. sRGB)
// impossible to use. However, during view creation, if an image isn't used as storage and not a
// target for the detiler, we can temporary remove its storage bit.
// impossible to use. However, during view creation, if an image isn't used as storage we can
// temporary remove its storage bit.
std::optional<vk::ImageUsageFlags> usage_override;
if (!image.info.is_storage && !view_info.used_for_detiling) {
if (!image.info.is_storage) {
usage_override = image.info.usage & ~vk::ImageUsageFlagBits::eStorage;
}