From 128884cc0633d4605f1dd678649906c70b57916a Mon Sep 17 00:00:00 2001 From: Emulator-Team-2 <38318848+Emulator-Team-2@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:10:23 +0200 Subject: [PATCH 1/3] added data_format=36 and num_format=9 --- src/video_core/renderer_vulkan/liverpool_to_vk.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp index 025f311d8..d474cee68 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp @@ -296,6 +296,7 @@ std::span GetAllFormats() { vk::Format::eB10G11R11UfloatPack32, vk::Format::eBc1RgbaSrgbBlock, vk::Format::eBc1RgbaUnormBlock, + vk::Format::eBc2SrgbBlock, vk::Format::eBc2UnormBlock, vk::Format::eBc3SrgbBlock, vk::Format::eBc3UnormBlock, @@ -457,6 +458,9 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu } if (data_format == AmdGpu::DataFormat::FormatBc7 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eBc7UnormBlock; + } + if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Srgb) { + return vk::Format::eBc2SrgbBlock; } if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eBc2UnormBlock; From cb6e67d6e189e3d7a0580c945f3c62acd59b2dac Mon Sep 17 00:00:00 2001 From: Emulator-Team-2 <38318848+Emulator-Team-2@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:12:59 +0200 Subject: [PATCH 2/3] added data_format=3 and num_format=4 --- src/video_core/renderer_vulkan/liverpool_to_vk.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp index d474cee68..89ee01589 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp @@ -453,6 +453,9 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eR8G8Unorm; } + if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Uint) { + return vk::Format::eR8G8Uint; + } if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Snorm) { return vk::Format::eR8G8Snorm; } From 357374f42b08594e04fc499612717121f390a3f0 Mon Sep 17 00:00:00 2001 From: Emulator-Team-2 <38318848+Emulator-Team-2@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:45:32 +0200 Subject: [PATCH 3/3] clang-format fix --- src/video_core/renderer_vulkan/liverpool_to_vk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp index 89ee01589..3ae19a82a 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp @@ -462,8 +462,8 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu if (data_format == AmdGpu::DataFormat::FormatBc7 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eBc7UnormBlock; } - if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Srgb) { - return vk::Format::eBc2SrgbBlock; + if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Srgb) { + return vk::Format::eBc2SrgbBlock; } if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eBc2UnormBlock;