summaryrefslogtreecommitdiff
path: root/src/video_core/surface.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-10-02 19:00:16 -0400
committerGravatar FernandoS272019-10-09 12:44:31 -0400
commitb9ddb517b191b449b8d935acb29962e43054dde4 (patch)
tree1b57f73765004537476b04cb7ce131a3a7522453 /src/video_core/surface.cpp
parentMerge pull request #2921 from FreddyFunk/compiler-warnings-core (diff)
downloadyuzu-b9ddb517b191b449b8d935acb29962e43054dde4.tar.gz
yuzu-b9ddb517b191b449b8d935acb29962e43054dde4.tar.xz
yuzu-b9ddb517b191b449b8d935acb29962e43054dde4.zip
Surfaces: Implement ASTC 6x6 10x10 12x12 8x6 6x5
Diffstat (limited to 'src/video_core/surface.cpp')
-rw-r--r--src/video_core/surface.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index 250afc6d6..a61dcbfb0 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -350,6 +350,16 @@ PixelFormat PixelFormatFromTextureFormat(Tegra::Texture::TextureFormat format,
350 return is_srgb ? PixelFormat::ASTC_2D_8X5_SRGB : PixelFormat::ASTC_2D_8X5; 350 return is_srgb ? PixelFormat::ASTC_2D_8X5_SRGB : PixelFormat::ASTC_2D_8X5;
351 case Tegra::Texture::TextureFormat::ASTC_2D_10X8: 351 case Tegra::Texture::TextureFormat::ASTC_2D_10X8:
352 return is_srgb ? PixelFormat::ASTC_2D_10X8_SRGB : PixelFormat::ASTC_2D_10X8; 352 return is_srgb ? PixelFormat::ASTC_2D_10X8_SRGB : PixelFormat::ASTC_2D_10X8;
353 case Tegra::Texture::TextureFormat::ASTC_2D_6X6:
354 return is_srgb ? PixelFormat::ASTC_2D_6X6_SRGB : PixelFormat::ASTC_2D_6X6;
355 case Tegra::Texture::TextureFormat::ASTC_2D_10X10:
356 return is_srgb ? PixelFormat::ASTC_2D_10X10_SRGB : PixelFormat::ASTC_2D_10X10;
357 case Tegra::Texture::TextureFormat::ASTC_2D_12X12:
358 return is_srgb ? PixelFormat::ASTC_2D_12X12_SRGB : PixelFormat::ASTC_2D_12X12;
359 case Tegra::Texture::TextureFormat::ASTC_2D_8X6:
360 return is_srgb ? PixelFormat::ASTC_2D_8X6_SRGB : PixelFormat::ASTC_2D_8X6;
361 case Tegra::Texture::TextureFormat::ASTC_2D_6X5:
362 return is_srgb ? PixelFormat::ASTC_2D_6X5_SRGB : PixelFormat::ASTC_2D_6X5;
353 case Tegra::Texture::TextureFormat::R16_G16: 363 case Tegra::Texture::TextureFormat::R16_G16:
354 switch (component_type) { 364 switch (component_type) {
355 case Tegra::Texture::ComponentType::FLOAT: 365 case Tegra::Texture::ComponentType::FLOAT:
@@ -510,6 +520,16 @@ bool IsPixelFormatASTC(PixelFormat format) {
510 case PixelFormat::ASTC_2D_8X5_SRGB: 520 case PixelFormat::ASTC_2D_8X5_SRGB:
511 case PixelFormat::ASTC_2D_10X8: 521 case PixelFormat::ASTC_2D_10X8:
512 case PixelFormat::ASTC_2D_10X8_SRGB: 522 case PixelFormat::ASTC_2D_10X8_SRGB:
523 case PixelFormat::ASTC_2D_6X6:
524 case PixelFormat::ASTC_2D_6X6_SRGB:
525 case PixelFormat::ASTC_2D_10X10:
526 case PixelFormat::ASTC_2D_10X10_SRGB:
527 case PixelFormat::ASTC_2D_12X12:
528 case PixelFormat::ASTC_2D_12X12_SRGB:
529 case PixelFormat::ASTC_2D_8X6:
530 case PixelFormat::ASTC_2D_8X6_SRGB:
531 case PixelFormat::ASTC_2D_6X5:
532 case PixelFormat::ASTC_2D_6X5_SRGB:
513 return true; 533 return true;
514 default: 534 default:
515 return false; 535 return false;
@@ -530,6 +550,11 @@ bool IsPixelFormatSRGB(PixelFormat format) {
530 case PixelFormat::ASTC_2D_5X4_SRGB: 550 case PixelFormat::ASTC_2D_5X4_SRGB:
531 case PixelFormat::ASTC_2D_5X5_SRGB: 551 case PixelFormat::ASTC_2D_5X5_SRGB:
532 case PixelFormat::ASTC_2D_10X8_SRGB: 552 case PixelFormat::ASTC_2D_10X8_SRGB:
553 case PixelFormat::ASTC_2D_6X6_SRGB:
554 case PixelFormat::ASTC_2D_10X10_SRGB:
555 case PixelFormat::ASTC_2D_12X12_SRGB:
556 case PixelFormat::ASTC_2D_8X6_SRGB:
557 case PixelFormat::ASTC_2D_6X5_SRGB:
533 return true; 558 return true;
534 default: 559 default:
535 return false; 560 return false;