summaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2022-04-13 17:01:57 +0200
committerGravatar Liam2022-04-14 11:06:27 -0400
commitf783883bf89311b51aef76b6b8b07d112369eca7 (patch)
tree840182ad79bb2b6025aa79e01adf8a063f8c7ea6 /src/video_core/texture_cache
parentbuffer_cache: cap vertex buffer sizes (diff)
downloadyuzu-f783883bf89311b51aef76b6b8b07d112369eca7.tar.gz
yuzu-f783883bf89311b51aef76b6b8b07d112369eca7.tar.xz
yuzu-f783883bf89311b51aef76b6b8b07d112369eca7.zip
video_core: implement formats for N64 emulation
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/format_lookup_table.cpp6
-rw-r--r--src/video_core/texture_cache/formatter.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp
index afa807d5d..20e64a7c2 100644
--- a/src/video_core/texture_cache/format_lookup_table.cpp
+++ b/src/video_core/texture_cache/format_lookup_table.cpp
@@ -63,6 +63,10 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red,
63 return PixelFormat::A1B5G5R5_UNORM; 63 return PixelFormat::A1B5G5R5_UNORM;
64 case Hash(TextureFormat::A4B4G4R4, UNORM): 64 case Hash(TextureFormat::A4B4G4R4, UNORM):
65 return PixelFormat::A4B4G4R4_UNORM; 65 return PixelFormat::A4B4G4R4_UNORM;
66 case Hash(TextureFormat::G4R4, UNORM):
67 return PixelFormat::R4G4_UNORM;
68 case Hash(TextureFormat::A5B5G5R1, UNORM):
69 return PixelFormat::A5B5G5R1_UNORM;
66 case Hash(TextureFormat::R8, UNORM): 70 case Hash(TextureFormat::R8, UNORM):
67 return PixelFormat::R8_UNORM; 71 return PixelFormat::R8_UNORM;
68 case Hash(TextureFormat::R8, SNORM): 72 case Hash(TextureFormat::R8, SNORM):
@@ -143,6 +147,8 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red,
143 return PixelFormat::S8_UINT_D24_UNORM; 147 return PixelFormat::S8_UINT_D24_UNORM;
144 case Hash(TextureFormat::R8G24, UINT, UNORM, UNORM, UNORM, LINEAR): 148 case Hash(TextureFormat::R8G24, UINT, UNORM, UNORM, UNORM, LINEAR):
145 return PixelFormat::S8_UINT_D24_UNORM; 149 return PixelFormat::S8_UINT_D24_UNORM;
150 case Hash(TextureFormat::D24S8, UNORM, UINT, UINT, UINT, LINEAR):
151 return PixelFormat::D24_UNORM_S8_UINT;
146 case Hash(TextureFormat::D32S8, FLOAT, UINT, UNORM, UNORM, LINEAR): 152 case Hash(TextureFormat::D32S8, FLOAT, UINT, UNORM, UNORM, LINEAR):
147 return PixelFormat::D32_FLOAT_S8_UINT; 153 return PixelFormat::D32_FLOAT_S8_UINT;
148 case Hash(TextureFormat::BC1_RGBA, UNORM, LINEAR): 154 case Hash(TextureFormat::BC1_RGBA, UNORM, LINEAR):
diff --git a/src/video_core/texture_cache/formatter.h b/src/video_core/texture_cache/formatter.h
index b2c81057b..6f5afc5a9 100644
--- a/src/video_core/texture_cache/formatter.h
+++ b/src/video_core/texture_cache/formatter.h
@@ -38,6 +38,8 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str
38 return "A2B10G10R10_UINT"; 38 return "A2B10G10R10_UINT";
39 case PixelFormat::A1B5G5R5_UNORM: 39 case PixelFormat::A1B5G5R5_UNORM:
40 return "A1B5G5R5_UNORM"; 40 return "A1B5G5R5_UNORM";
41 case PixelFormat::A5B5G5R1_UNORM:
42 return "A5B5G5R1_UNORM";
41 case PixelFormat::R8_UNORM: 43 case PixelFormat::R8_UNORM:
42 return "R8_UNORM"; 44 return "R8_UNORM";
43 case PixelFormat::R8_SNORM: 45 case PixelFormat::R8_SNORM:
@@ -152,6 +154,8 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str
152 return "BC7_SRGB"; 154 return "BC7_SRGB";
153 case PixelFormat::A4B4G4R4_UNORM: 155 case PixelFormat::A4B4G4R4_UNORM:
154 return "A4B4G4R4_UNORM"; 156 return "A4B4G4R4_UNORM";
157 case PixelFormat::R4G4_UNORM:
158 return "R4G4_UNORM";
155 case PixelFormat::ASTC_2D_4X4_SRGB: 159 case PixelFormat::ASTC_2D_4X4_SRGB:
156 return "ASTC_2D_4X4_SRGB"; 160 return "ASTC_2D_4X4_SRGB";
157 case PixelFormat::ASTC_2D_8X8_SRGB: 161 case PixelFormat::ASTC_2D_8X8_SRGB: