[texture_cache] Added typeless storage form

This commit is contained in:
CamilleLaVey
2026-07-04 00:01:31 -04:00
parent bd8caa5294
commit 943f91cf0b
2 changed files with 7 additions and 1 deletions
@@ -2244,7 +2244,12 @@ VkImageView ImageView::StorageView(Shader::TextureType texture_type,
Shader::ImageFormat image_format) {
if (image_handle) {
if (image_format == Shader::ImageFormat::Typeless) {
return Handle(texture_type);
if (!typeless_storage_view) {
const auto& info =
MaxwellToVK::SurfaceFormat(*device, FormatType::Optimal, true, format);
typeless_storage_view = MakeView(info.format, VK_IMAGE_ASPECT_COLOR_BIT);
}
return *typeless_storage_view;
}
const bool is_signed = image_format == Shader::ImageFormat::R8_SINT
|| image_format == Shader::ImageFormat::R16_SINT;
@@ -377,6 +377,7 @@ private:
std::array<vk::ImageView, Shader::NUM_TEXTURE_TYPES> image_views;
std::optional<StorageViews> storage_views;
vk::ImageView typeless_storage_view;
vk::ImageView depth_view;
vk::ImageView stencil_view;
vk::ImageView color_view;