texture_cache: detiler: redundant flag removed
This commit is contained in:
parent
cb07778008
commit
b17b4ab787
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue