diff options
| author | 2023-03-14 11:35:37 -0400 | |
|---|---|---|
| committer | 2023-03-14 11:35:37 -0400 | |
| commit | 0c7149d222a42bbc4653f6e56af1e8b0f2a8017d (patch) | |
| tree | e3b2f2d7ab921224b45c7794a7b62c6ea6a236d4 /src/video_core/renderer_vulkan | |
| parent | Merge pull request #9951 from Morph1984/save (diff) | |
| parent | video_core: Update texture format (diff) | |
| download | yuzu-0c7149d222a42bbc4653f6e56af1e8b0f2a8017d.tar.gz yuzu-0c7149d222a42bbc4653f6e56af1e8b0f2a8017d.tar.xz yuzu-0c7149d222a42bbc4653f6e56af1e8b0f2a8017d.zip | |
Merge pull request #9933 from vonchenplus/texture_format
video_core: Update texture format
Diffstat (limited to 'src/video_core/renderer_vulkan')
| -rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index ca52e2389..5dce51be8 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -166,7 +166,7 @@ struct FormatTuple { | |||
| 166 | {VK_FORMAT_R16G16_UINT, Attachable | Storage}, // R16G16_UINT | 166 | {VK_FORMAT_R16G16_UINT, Attachable | Storage}, // R16G16_UINT |
| 167 | {VK_FORMAT_R16G16_SINT, Attachable | Storage}, // R16G16_SINT | 167 | {VK_FORMAT_R16G16_SINT, Attachable | Storage}, // R16G16_SINT |
| 168 | {VK_FORMAT_R16G16_SNORM, Attachable | Storage}, // R16G16_SNORM | 168 | {VK_FORMAT_R16G16_SNORM, Attachable | Storage}, // R16G16_SNORM |
| 169 | {VK_FORMAT_UNDEFINED}, // R32G32B32_FLOAT | 169 | {VK_FORMAT_R32G32B32_SFLOAT}, // R32G32B32_FLOAT |
| 170 | {VK_FORMAT_A8B8G8R8_SRGB_PACK32, Attachable}, // A8B8G8R8_SRGB | 170 | {VK_FORMAT_A8B8G8R8_SRGB_PACK32, Attachable}, // A8B8G8R8_SRGB |
| 171 | {VK_FORMAT_R8G8_UNORM, Attachable | Storage}, // R8G8_UNORM | 171 | {VK_FORMAT_R8G8_UNORM, Attachable | Storage}, // R8G8_UNORM |
| 172 | {VK_FORMAT_R8G8_SNORM, Attachable | Storage}, // R8G8_SNORM | 172 | {VK_FORMAT_R8G8_SNORM, Attachable | Storage}, // R8G8_SNORM |
| @@ -234,11 +234,6 @@ FormatInfo SurfaceFormat(const Device& device, FormatType format_type, bool with | |||
| 234 | PixelFormat pixel_format) { | 234 | PixelFormat pixel_format) { |
| 235 | ASSERT(static_cast<size_t>(pixel_format) < std::size(tex_format_tuples)); | 235 | ASSERT(static_cast<size_t>(pixel_format) < std::size(tex_format_tuples)); |
| 236 | FormatTuple tuple = tex_format_tuples[static_cast<size_t>(pixel_format)]; | 236 | FormatTuple tuple = tex_format_tuples[static_cast<size_t>(pixel_format)]; |
| 237 | if (tuple.format == VK_FORMAT_UNDEFINED) { | ||
| 238 | UNIMPLEMENTED_MSG("Unimplemented texture format with pixel format={}", pixel_format); | ||
| 239 | return FormatInfo{VK_FORMAT_A8B8G8R8_UNORM_PACK32, true, true}; | ||
| 240 | } | ||
| 241 | |||
| 242 | // Use A8B8G8R8_UNORM on hardware that doesn't support ASTC natively | 237 | // Use A8B8G8R8_UNORM on hardware that doesn't support ASTC natively |
| 243 | if (!device.IsOptimalAstcSupported() && VideoCore::Surface::IsPixelFormatASTC(pixel_format)) { | 238 | if (!device.IsOptimalAstcSupported() && VideoCore::Surface::IsPixelFormatASTC(pixel_format)) { |
| 244 | const bool is_srgb = with_srgb && VideoCore::Surface::IsPixelFormatSRGB(pixel_format); | 239 | const bool is_srgb = with_srgb && VideoCore::Surface::IsPixelFormatSRGB(pixel_format); |