From 2951788afc1bb4b53c6d427ca56c598247fd6f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A5IGA?= <164882787+Xphalnos@users.noreply.github.com> Date: Fri, 3 Jan 2025 20:11:24 +0100 Subject: [PATCH] texture_cache: Adding some missing textures (#2031) --- src/video_core/texture_cache/tile_manager.cpp | 71 +++++++++++-------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/src/video_core/texture_cache/tile_manager.cpp b/src/video_core/texture_cache/tile_manager.cpp index 0e550c7dc..6b14b4602 100644 --- a/src/video_core/texture_cache/tile_manager.cpp +++ b/src/video_core/texture_cache/tile_manager.cpp @@ -25,54 +25,69 @@ namespace VideoCore { static vk::Format DemoteImageFormatForDetiling(vk::Format format) { switch (format) { - case vk::Format::eR8Uint: case vk::Format::eR8Unorm: case vk::Format::eR8Snorm: + case vk::Format::eR8Uint: + case vk::Format::eR8Srgb: return vk::Format::eR8Uint; - case vk::Format::eR4G4B4A4UnormPack16: - case vk::Format::eB5G6R5UnormPack16: - case vk::Format::eR5G5B5A1UnormPack16: case vk::Format::eR8G8Unorm: - case vk::Format::eR16Sfloat: - case vk::Format::eR16Uint: + case vk::Format::eR8G8Snorm: + case vk::Format::eR8G8Uint: + case vk::Format::eR8G8Srgb: case vk::Format::eR16Unorm: + case vk::Format::eR16Snorm: + case vk::Format::eR16Uint: + case vk::Format::eR16Sfloat: case vk::Format::eD16Unorm: + case vk::Format::eR4G4B4A4UnormPack16: + case vk::Format::eR5G5B5A1UnormPack16: + case vk::Format::eB5G5R5A1UnormPack16: + case vk::Format::eB5G6R5UnormPack16: return vk::Format::eR8G8Uint; - case vk::Format::eR8G8B8A8Srgb: - case vk::Format::eB8G8R8A8Srgb: - case vk::Format::eB8G8R8A8Unorm: case vk::Format::eR8G8B8A8Unorm: case vk::Format::eR8G8B8A8Snorm: case vk::Format::eR8G8B8A8Uint: - case vk::Format::eR32Sfloat: - case vk::Format::eD32Sfloat: - case vk::Format::eR32Uint: - case vk::Format::eR16G16Sfloat: + case vk::Format::eR8G8B8A8Srgb: + case vk::Format::eB8G8R8A8Unorm: + case vk::Format::eB8G8R8A8Snorm: + case vk::Format::eB8G8R8A8Uint: + case vk::Format::eB8G8R8A8Srgb: case vk::Format::eR16G16Unorm: case vk::Format::eR16G16Snorm: - case vk::Format::eB10G11R11UfloatPack32: + case vk::Format::eR16G16Uint: + case vk::Format::eR16G16Sfloat: + case vk::Format::eR32Uint: + case vk::Format::eR32Sfloat: + case vk::Format::eD32Sfloat: case vk::Format::eA2B10G10R10UnormPack32: + case vk::Format::eA2B10G10R10SnormPack32: + case vk::Format::eA2B10G10R10UintPack32: + case vk::Format::eB10G11R11UfloatPack32: + case vk::Format::eE5B9G9R9UfloatPack32: return vk::Format::eR32Uint; - case vk::Format::eBc1RgbaSrgbBlock: - case vk::Format::eBc1RgbaUnormBlock: - case vk::Format::eBc4UnormBlock: - case vk::Format::eR32G32Sfloat: - case vk::Format::eR32G32Uint: case vk::Format::eR16G16B16A16Unorm: + case vk::Format::eR16G16B16A16Snorm: case vk::Format::eR16G16B16A16Uint: case vk::Format::eR16G16B16A16Sfloat: + case vk::Format::eR32G32Uint: + case vk::Format::eR32G32Sfloat: + case vk::Format::eBc1RgbaUnormBlock: + case vk::Format::eBc1RgbaSrgbBlock: + case vk::Format::eBc4UnormBlock: + case vk::Format::eBc4SnormBlock: return vk::Format::eR32G32Uint; - case vk::Format::eBc2SrgbBlock: - case vk::Format::eBc2UnormBlock: - case vk::Format::eBc3SrgbBlock: - case vk::Format::eBc3UnormBlock: - case vk::Format::eBc5UnormBlock: - case vk::Format::eBc5SnormBlock: - case vk::Format::eBc7SrgbBlock: - case vk::Format::eBc7UnormBlock: - case vk::Format::eBc6HUfloatBlock: case vk::Format::eR32G32B32A32Uint: case vk::Format::eR32G32B32A32Sfloat: + case vk::Format::eBc2UnormBlock: + case vk::Format::eBc2SrgbBlock: + case vk::Format::eBc3UnormBlock: + case vk::Format::eBc3SrgbBlock: + case vk::Format::eBc5UnormBlock: + case vk::Format::eBc5SnormBlock: + case vk::Format::eBc6HUfloatBlock: + case vk::Format::eBc6HSfloatBlock: + case vk::Format::eBc7UnormBlock: + case vk::Format::eBc7SrgbBlock: return vk::Format::eR32G32B32A32Uint; default: break;