summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_texture_cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index e1ba1bdaf..ef8ae6cb6 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -1063,21 +1063,10 @@ void TextureCacheRuntime::ConvertImage(Framebuffer* dst, ImageView& dst_view, Im
}
break;
case PixelFormat::A8B8G8R8_UNORM:
- case PixelFormat::B8G8R8A8_UNORM:
if (src_view.format == PixelFormat::S8_UINT_D24_UNORM) {
return blit_image_helper.ConvertD24S8ToABGR8(dst, src_view, up_scale, down_shift);
}
break;
- case PixelFormat::B10G11R11_FLOAT:
- if (src_view.format == PixelFormat::S8_UINT_D24_UNORM) {
- return blit_image_helper.ConvertD24S8ToB10G11R11(dst, src_view, up_scale, down_shift);
- }
- break;
- case PixelFormat::R16G16_UNORM:
- if (src_view.format == PixelFormat::S8_UINT_D24_UNORM) {
- return blit_image_helper.ConvertD24S8ToR16G16(dst, src_view, up_scale, down_shift);
- }
- break;
case PixelFormat::R32_FLOAT:
if (src_view.format == PixelFormat::D32_FLOAT) {
return blit_image_helper.ConvertD32ToR32(dst, src_view, up_scale, down_shift);
@@ -1089,16 +1078,7 @@ void TextureCacheRuntime::ConvertImage(Framebuffer* dst, ImageView& dst_view, Im
}
break;
case PixelFormat::S8_UINT_D24_UNORM:
- if (src_view.format == PixelFormat::A8B8G8R8_UNORM ||
- src_view.format == PixelFormat::B8G8R8A8_UNORM) {
- return blit_image_helper.ConvertABGR8ToD24S8(dst, src_view, up_scale, down_shift);
- }
- if (src_view.format == PixelFormat::B10G11R11_FLOAT) {
- return blit_image_helper.ConvertB10G11R11ToD24S8(dst, src_view, up_scale, down_shift);
- }
- if (src_view.format == PixelFormat::R16G16_UNORM) {
- return blit_image_helper.ConvertR16G16ToD24S8(dst, src_view, up_scale, down_shift);
- }
+ return blit_image_helper.ConvertABGR8ToD24S8(dst, src_view, up_scale, down_shift);
break;
case PixelFormat::D32_FLOAT:
if (src_view.format == PixelFormat::R32_FLOAT) {
@@ -1595,6 +1575,14 @@ VkImageView ImageView::StencilView() {
return *stencil_view;
}
+VkImageView ImageView::ColorView() {
+ if (color_view) {
+ return *color_view;
+ }
+ color_view = MakeView(VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_ASPECT_COLOR_BIT);
+ return *color_view;
+}
+
VkImageView ImageView::StorageView(Shader::TextureType texture_type,
Shader::ImageFormat image_format) {
if (image_format == Shader::ImageFormat::Typeless) {