summaryrefslogtreecommitdiff
path: root/src/video_core/surface.cpp
diff options
context:
space:
mode:
authorGravatar greggameplayer2018-11-13 03:34:54 +0100
committerGravatar bunnei2018-11-12 18:34:54 -0800
commitc8b3f09876e796f3c249f17f7f39e78bc1e3de74 (patch)
treef472a868f338f3ed37def141165b75ff2bca5f25 /src/video_core/surface.cpp
parentMerge pull request #1650 from FreddyFunk/cast (diff)
downloadyuzu-c8b3f09876e796f3c249f17f7f39e78bc1e3de74.tar.gz
yuzu-c8b3f09876e796f3c249f17f7f39e78bc1e3de74.tar.xz
yuzu-c8b3f09876e796f3c249f17f7f39e78bc1e3de74.zip
Implement ASTC_2D_10X8 & ASTC_2D_10X8_SRGB (#1666)
* Implement ASTC_2D_10X8 & ASTC_2D_10X8_SRGB ( needed by Mario+Rabbids Kingdom Battle ) * Small placement correction
Diffstat (limited to 'src/video_core/surface.cpp')
-rw-r--r--src/video_core/surface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index 051ad3964..9582dd2ca 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -306,6 +306,8 @@ PixelFormat PixelFormatFromTextureFormat(Tegra::Texture::TextureFormat format,
306 return is_srgb ? PixelFormat::ASTC_2D_8X8_SRGB : PixelFormat::ASTC_2D_8X8; 306 return is_srgb ? PixelFormat::ASTC_2D_8X8_SRGB : PixelFormat::ASTC_2D_8X8;
307 case Tegra::Texture::TextureFormat::ASTC_2D_8X5: 307 case Tegra::Texture::TextureFormat::ASTC_2D_8X5:
308 return is_srgb ? PixelFormat::ASTC_2D_8X5_SRGB : PixelFormat::ASTC_2D_8X5; 308 return is_srgb ? PixelFormat::ASTC_2D_8X5_SRGB : PixelFormat::ASTC_2D_8X5;
309 case Tegra::Texture::TextureFormat::ASTC_2D_10X8:
310 return is_srgb ? PixelFormat::ASTC_2D_10X8_SRGB : PixelFormat::ASTC_2D_10X8;
309 case Tegra::Texture::TextureFormat::R16_G16: 311 case Tegra::Texture::TextureFormat::R16_G16:
310 switch (component_type) { 312 switch (component_type) {
311 case Tegra::Texture::ComponentType::FLOAT: 313 case Tegra::Texture::ComponentType::FLOAT:
@@ -453,6 +455,8 @@ bool IsPixelFormatASTC(PixelFormat format) {
453 case PixelFormat::ASTC_2D_5X5_SRGB: 455 case PixelFormat::ASTC_2D_5X5_SRGB:
454 case PixelFormat::ASTC_2D_8X8_SRGB: 456 case PixelFormat::ASTC_2D_8X8_SRGB:
455 case PixelFormat::ASTC_2D_8X5_SRGB: 457 case PixelFormat::ASTC_2D_8X5_SRGB:
458 case PixelFormat::ASTC_2D_10X8:
459 case PixelFormat::ASTC_2D_10X8_SRGB:
456 return true; 460 return true;
457 default: 461 default:
458 return false; 462 return false;