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) {
|
if (info.is_tiled) {
|
||||||
ImageViewInfo view_info;
|
ImageViewInfo view_info;
|
||||||
view_info.format = DemoteImageFormatForDetiling(info.pixel_format);
|
view_info.format = DemoteImageFormatForDetiling(info.pixel_format);
|
||||||
view_info.used_for_detiling = true;
|
|
||||||
view_for_detiler.emplace(*instance, view_info, image);
|
view_for_detiler.emplace(*instance, view_info, image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ struct ImageViewInfo {
|
||||||
vk::Format format = vk::Format::eR8G8B8A8Unorm;
|
vk::Format format = vk::Format::eR8G8B8A8Unorm;
|
||||||
SubresourceRange range;
|
SubresourceRange range;
|
||||||
vk::ComponentMapping mapping{};
|
vk::ComponentMapping mapping{};
|
||||||
bool used_for_detiling = false;
|
|
||||||
|
|
||||||
auto operator<=>(const ImageViewInfo&) const = default;
|
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)
|
// 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
|
// impossible to use. However, during view creation, if an image isn't used as storage we can
|
||||||
// target for the detiler, we can temporary remove its storage bit.
|
// temporary remove its storage bit.
|
||||||
std::optional<vk::ImageUsageFlags> usage_override;
|
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;
|
usage_override = image.info.usage & ~vk::ImageUsageFlagBits::eStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue