diff options
| author | 2023-06-06 23:10:06 +0300 | |
|---|---|---|
| committer | 2023-06-27 18:00:09 -0700 | |
| commit | eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe (patch) | |
| tree | 761e98947d8e26a6409e24befa99cd127f67458d /src/video_core/surface.cpp | |
| parent | renderer_vulkan: Add more feature checking (diff) | |
| download | yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.tar.gz yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.tar.xz yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.zip | |
video_core: Add BCn decoding support
Diffstat (limited to 'src/video_core/surface.cpp')
| -rw-r--r-- | src/video_core/surface.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index cb51529e4..e16cd5e73 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp | |||
| @@ -269,6 +269,28 @@ bool IsPixelFormatASTC(PixelFormat format) { | |||
| 269 | } | 269 | } |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | bool IsPixelFormatBCn(PixelFormat format) { | ||
| 273 | switch (format) { | ||
| 274 | case PixelFormat::BC1_RGBA_UNORM: | ||
| 275 | case PixelFormat::BC2_UNORM: | ||
| 276 | case PixelFormat::BC3_UNORM: | ||
| 277 | case PixelFormat::BC4_UNORM: | ||
| 278 | case PixelFormat::BC4_SNORM: | ||
| 279 | case PixelFormat::BC5_UNORM: | ||
| 280 | case PixelFormat::BC5_SNORM: | ||
| 281 | case PixelFormat::BC1_RGBA_SRGB: | ||
| 282 | case PixelFormat::BC2_SRGB: | ||
| 283 | case PixelFormat::BC3_SRGB: | ||
| 284 | case PixelFormat::BC7_UNORM: | ||
| 285 | case PixelFormat::BC6H_UFLOAT: | ||
| 286 | case PixelFormat::BC6H_SFLOAT: | ||
| 287 | case PixelFormat::BC7_SRGB: | ||
| 288 | return true; | ||
| 289 | default: | ||
| 290 | return false; | ||
| 291 | } | ||
| 292 | } | ||
| 293 | |||
| 272 | bool IsPixelFormatSRGB(PixelFormat format) { | 294 | bool IsPixelFormatSRGB(PixelFormat format) { |
| 273 | switch (format) { | 295 | switch (format) { |
| 274 | case PixelFormat::A8B8G8R8_SRGB: | 296 | case PixelFormat::A8B8G8R8_SRGB: |