summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_core/renderer_opengl/maxwell_to_gl.h2
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.cpp2
-rw-r--r--src/video_core/surface.cpp3
-rw-r--r--src/video_core/surface.h8
-rw-r--r--src/video_core/texture_cache/format_lookup_table.cpp4
-rw-r--r--src/video_core/texture_cache/formatter.h4
6 files changed, 23 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h
index 9a72d0d6d..dfe7f26ca 100644
--- a/src/video_core/renderer_opengl/maxwell_to_gl.h
+++ b/src/video_core/renderer_opengl/maxwell_to_gl.h
@@ -99,6 +99,8 @@ constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> FORMAT_TAB
99 {GL_COMPRESSED_RGBA_ASTC_6x6_KHR}, // ASTC_2D_6X6_UNORM 99 {GL_COMPRESSED_RGBA_ASTC_6x6_KHR}, // ASTC_2D_6X6_UNORM
100 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR}, // ASTC_2D_6X6_SRGB 100 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR}, // ASTC_2D_6X6_SRGB
101 {GL_COMPRESSED_RGBA_ASTC_10x6_KHR}, // ASTC_2D_10X6_UNORM 101 {GL_COMPRESSED_RGBA_ASTC_10x6_KHR}, // ASTC_2D_10X6_UNORM
102 {GL_COMPRESSED_RGBA_ASTC_10x5_KHR}, // ASTC_2D_10X5_UNORM
103 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR}, // ASTC_2D_10X5_SRGB
102 {GL_COMPRESSED_RGBA_ASTC_10x10_KHR}, // ASTC_2D_10X10_UNORM 104 {GL_COMPRESSED_RGBA_ASTC_10x10_KHR}, // ASTC_2D_10X10_UNORM
103 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR}, // ASTC_2D_10X10_SRGB 105 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR}, // ASTC_2D_10X10_SRGB
104 {GL_COMPRESSED_RGBA_ASTC_12x12_KHR}, // ASTC_2D_12X12_UNORM 106 {GL_COMPRESSED_RGBA_ASTC_12x12_KHR}, // ASTC_2D_12X12_UNORM
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index bdb71dc53..6703b8e68 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -196,6 +196,8 @@ struct FormatTuple {
196 {VK_FORMAT_ASTC_6x6_UNORM_BLOCK}, // ASTC_2D_6X6_UNORM 196 {VK_FORMAT_ASTC_6x6_UNORM_BLOCK}, // ASTC_2D_6X6_UNORM
197 {VK_FORMAT_ASTC_6x6_SRGB_BLOCK}, // ASTC_2D_6X6_SRGB 197 {VK_FORMAT_ASTC_6x6_SRGB_BLOCK}, // ASTC_2D_6X6_SRGB
198 {VK_FORMAT_ASTC_10x6_UNORM_BLOCK}, // ASTC_2D_10X6_UNORM 198 {VK_FORMAT_ASTC_10x6_UNORM_BLOCK}, // ASTC_2D_10X6_UNORM
199 {VK_FORMAT_ASTC_10x5_UNORM_BLOCK}, // ASTC_2D_10X5_UNORM
200 {VK_FORMAT_ASTC_10x5_SRGB_BLOCK}, // ASTC_2D_10X5_SRGB
199 {VK_FORMAT_ASTC_10x10_UNORM_BLOCK}, // ASTC_2D_10X10_UNORM 201 {VK_FORMAT_ASTC_10x10_UNORM_BLOCK}, // ASTC_2D_10X10_UNORM
200 {VK_FORMAT_ASTC_10x10_SRGB_BLOCK}, // ASTC_2D_10X10_SRGB 202 {VK_FORMAT_ASTC_10x10_SRGB_BLOCK}, // ASTC_2D_10X10_SRGB
201 {VK_FORMAT_ASTC_12x12_UNORM_BLOCK}, // ASTC_2D_12X12_UNORM 203 {VK_FORMAT_ASTC_12x12_UNORM_BLOCK}, // ASTC_2D_12X12_UNORM
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index 079d5f028..a2bf08294 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -247,6 +247,8 @@ bool IsPixelFormatASTC(PixelFormat format) {
247 case PixelFormat::ASTC_2D_6X6_UNORM: 247 case PixelFormat::ASTC_2D_6X6_UNORM:
248 case PixelFormat::ASTC_2D_6X6_SRGB: 248 case PixelFormat::ASTC_2D_6X6_SRGB:
249 case PixelFormat::ASTC_2D_10X6_UNORM: 249 case PixelFormat::ASTC_2D_10X6_UNORM:
250 case PixelFormat::ASTC_2D_10X5_UNORM:
251 case PixelFormat::ASTC_2D_10X5_SRGB:
250 case PixelFormat::ASTC_2D_10X10_UNORM: 252 case PixelFormat::ASTC_2D_10X10_UNORM:
251 case PixelFormat::ASTC_2D_10X10_SRGB: 253 case PixelFormat::ASTC_2D_10X10_SRGB:
252 case PixelFormat::ASTC_2D_12X12_UNORM: 254 case PixelFormat::ASTC_2D_12X12_UNORM:
@@ -276,6 +278,7 @@ bool IsPixelFormatSRGB(PixelFormat format) {
276 case PixelFormat::ASTC_2D_5X5_SRGB: 278 case PixelFormat::ASTC_2D_5X5_SRGB:
277 case PixelFormat::ASTC_2D_10X8_SRGB: 279 case PixelFormat::ASTC_2D_10X8_SRGB:
278 case PixelFormat::ASTC_2D_6X6_SRGB: 280 case PixelFormat::ASTC_2D_6X6_SRGB:
281 case PixelFormat::ASTC_2D_10X5_SRGB:
279 case PixelFormat::ASTC_2D_10X10_SRGB: 282 case PixelFormat::ASTC_2D_10X10_SRGB:
280 case PixelFormat::ASTC_2D_12X12_SRGB: 283 case PixelFormat::ASTC_2D_12X12_SRGB:
281 case PixelFormat::ASTC_2D_8X6_SRGB: 284 case PixelFormat::ASTC_2D_8X6_SRGB:
diff --git a/src/video_core/surface.h b/src/video_core/surface.h
index 16273f185..5fd82357c 100644
--- a/src/video_core/surface.h
+++ b/src/video_core/surface.h
@@ -94,6 +94,8 @@ enum class PixelFormat {
94 ASTC_2D_6X6_UNORM, 94 ASTC_2D_6X6_UNORM,
95 ASTC_2D_6X6_SRGB, 95 ASTC_2D_6X6_SRGB,
96 ASTC_2D_10X6_UNORM, 96 ASTC_2D_10X6_UNORM,
97 ASTC_2D_10X5_UNORM,
98 ASTC_2D_10X5_SRGB,
97 ASTC_2D_10X10_UNORM, 99 ASTC_2D_10X10_UNORM,
98 ASTC_2D_10X10_SRGB, 100 ASTC_2D_10X10_SRGB,
99 ASTC_2D_12X12_UNORM, 101 ASTC_2D_12X12_UNORM,
@@ -228,6 +230,8 @@ constexpr std::array<u8, MaxPixelFormat> BLOCK_WIDTH_TABLE = {{
228 6, // ASTC_2D_6X6_UNORM 230 6, // ASTC_2D_6X6_UNORM
229 6, // ASTC_2D_6X6_SRGB 231 6, // ASTC_2D_6X6_SRGB
230 10, // ASTC_2D_10X6_UNORM 232 10, // ASTC_2D_10X6_UNORM
233 10, // ASTC_2D_10X5_UNORM
234 10, // ASTC_2D_10X5_SRGB
231 10, // ASTC_2D_10X10_UNORM 235 10, // ASTC_2D_10X10_UNORM
232 10, // ASTC_2D_10X10_SRGB 236 10, // ASTC_2D_10X10_SRGB
233 12, // ASTC_2D_12X12_UNORM 237 12, // ASTC_2D_12X12_UNORM
@@ -331,6 +335,8 @@ constexpr std::array<u8, MaxPixelFormat> BLOCK_HEIGHT_TABLE = {{
331 6, // ASTC_2D_6X6_UNORM 335 6, // ASTC_2D_6X6_UNORM
332 6, // ASTC_2D_6X6_SRGB 336 6, // ASTC_2D_6X6_SRGB
333 6, // ASTC_2D_10X6_UNORM 337 6, // ASTC_2D_10X6_UNORM
338 5, // ASTC_2D_10X5_UNORM
339 5, // ASTC_2D_10X5_SRGB
334 10, // ASTC_2D_10X10_UNORM 340 10, // ASTC_2D_10X10_UNORM
335 10, // ASTC_2D_10X10_SRGB 341 10, // ASTC_2D_10X10_SRGB
336 12, // ASTC_2D_12X12_UNORM 342 12, // ASTC_2D_12X12_UNORM
@@ -434,6 +440,8 @@ constexpr std::array<u8, MaxPixelFormat> BITS_PER_BLOCK_TABLE = {{
434 128, // ASTC_2D_6X6_UNORM 440 128, // ASTC_2D_6X6_UNORM
435 128, // ASTC_2D_6X6_SRGB 441 128, // ASTC_2D_6X6_SRGB
436 128, // ASTC_2D_10X6_UNORM 442 128, // ASTC_2D_10X6_UNORM
443 128, // ASTC_2D_10X5_UNORM
444 128, // ASTC_2D_10X5_SRGB
437 128, // ASTC_2D_10X10_UNORM 445 128, // ASTC_2D_10X10_UNORM
438 128, // ASTC_2D_10X10_SRGB 446 128, // ASTC_2D_10X10_SRGB
439 128, // ASTC_2D_12X12_UNORM 447 128, // ASTC_2D_12X12_UNORM
diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp
index 1412aa076..c71694d2a 100644
--- a/src/video_core/texture_cache/format_lookup_table.cpp
+++ b/src/video_core/texture_cache/format_lookup_table.cpp
@@ -208,6 +208,10 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red,
208 return PixelFormat::ASTC_2D_6X6_SRGB; 208 return PixelFormat::ASTC_2D_6X6_SRGB;
209 case Hash(TextureFormat::ASTC_2D_10X6, UNORM, LINEAR): 209 case Hash(TextureFormat::ASTC_2D_10X6, UNORM, LINEAR):
210 return PixelFormat::ASTC_2D_10X6_UNORM; 210 return PixelFormat::ASTC_2D_10X6_UNORM;
211 case Hash(TextureFormat::ASTC_2D_10X5, UNORM, LINEAR):
212 return PixelFormat::ASTC_2D_10X5_UNORM;
213 case Hash(TextureFormat::ASTC_2D_10X5, UNORM, SRGB):
214 return PixelFormat::ASTC_2D_10X5_SRGB;
211 case Hash(TextureFormat::ASTC_2D_10X10, UNORM, LINEAR): 215 case Hash(TextureFormat::ASTC_2D_10X10, UNORM, LINEAR):
212 return PixelFormat::ASTC_2D_10X10_UNORM; 216 return PixelFormat::ASTC_2D_10X10_UNORM;
213 case Hash(TextureFormat::ASTC_2D_10X10, UNORM, SRGB): 217 case Hash(TextureFormat::ASTC_2D_10X10, UNORM, SRGB):
diff --git a/src/video_core/texture_cache/formatter.h b/src/video_core/texture_cache/formatter.h
index 95a572604..6881e4c90 100644
--- a/src/video_core/texture_cache/formatter.h
+++ b/src/video_core/texture_cache/formatter.h
@@ -177,6 +177,10 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str
177 return "ASTC_2D_6X6_SRGB"; 177 return "ASTC_2D_6X6_SRGB";
178 case PixelFormat::ASTC_2D_10X6_UNORM: 178 case PixelFormat::ASTC_2D_10X6_UNORM:
179 return "ASTC_2D_10X6_UNORM"; 179 return "ASTC_2D_10X6_UNORM";
180 case PixelFormat::ASTC_2D_10X5_UNORM:
181 return "ASTC_2D_10X5_UNORM";
182 case PixelFormat::ASTC_2D_10X5_SRGB:
183 return "ASTC_2D_10X5_SRGB";
180 case PixelFormat::ASTC_2D_10X10_UNORM: 184 case PixelFormat::ASTC_2D_10X10_UNORM:
181 return "ASTC_2D_10X10_UNORM"; 185 return "ASTC_2D_10X10_UNORM";
182 case PixelFormat::ASTC_2D_10X10_SRGB: 186 case PixelFormat::ASTC_2D_10X10_SRGB: