Browse Source

Try another method

pull/3101/head
JPikachu 3 weeks ago
parent
commit
877a48f5fd
  1. 9
      src/video_core/renderer_vulkan/vk_texture_cache.cpp

9
src/video_core/renderer_vulkan/vk_texture_cache.cpp

@ -2169,11 +2169,18 @@ VkImageView ImageView::StorageView(Shader::TextureType texture_type,
storage_views = std::make_unique<StorageViews>(); storage_views = std::make_unique<StorageViews>();
} }
if (image_format == Shader::ImageFormat::Typeless) { if (image_format == Shader::ImageFormat::Typeless) {
auto& unsigned_view = storage_views->unsigneds[static_cast<size_t>(texture_type)];
if (unsigned_view) {
return *unsigned_view;
}
auto& view = storage_views->typeless_views[static_cast<size_t>(texture_type)]; auto& view = storage_views->typeless_views[static_cast<size_t>(texture_type)];
if (view) { if (view) {
return *view; return *view;
} }
view = MakeView(format, VK_IMAGE_ASPECT_COLOR_BIT);
const auto fmt_info =
MaxwellToVK::SurfaceFormat(*device, FormatType::Optimal, /*is_image=*/true, format);
const VkFormat vk_format = fmt_info.format;
view = MakeView(vk_format, VK_IMAGE_ASPECT_COLOR_BIT);
return *view; return *view;
} }
const bool is_signed{image_format == Shader::ImageFormat::R8_SINT || const bool is_signed{image_format == Shader::ImageFormat::R8_SINT ||

Loading…
Cancel
Save