diff options
author | bunnei <bunneidev@gmail.com> | 2018-06-18 05:50:44 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-06-18 07:56:59 +0200 |
commit | 61779fa072fea906410eca3e29ba54fe1ee347d3 (patch) | |
tree | cf52473bbca8d54e6edfddf28d874d8a1e50856b /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | Merge pull request #569 from bunnei/fix-cache (diff) | |
download | yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.tar yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.tar.gz yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.tar.bz2 yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.tar.lz yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.tar.xz yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.tar.zst yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 0f43e863d..9da945e19 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -65,6 +65,7 @@ struct SurfaceParams { DXT23 = 8, DXT45 = 9, DXN1 = 10, // This is also known as BC4 + ASTC_2D_4X4 = 11, Max, Invalid = 255, @@ -111,6 +112,7 @@ struct SurfaceParams { 4, // DXT23 4, // DXT45 4, // DXN1 + 1, // ASTC_2D_4X4 }}; ASSERT(static_cast<size_t>(format) < compression_factor_table.size()); @@ -136,6 +138,7 @@ struct SurfaceParams { 128, // DXT23 128, // DXT45 64, // DXN1 + 32, // ASTC_2D_4X4 }}; ASSERT(static_cast<size_t>(format) < bpp_table.size()); @@ -162,6 +165,15 @@ struct SurfaceParams { } } + static bool IsFormatASTC(PixelFormat format) { + switch (format) { + case PixelFormat::ASTC_2D_4X4: + return true; + default: + return false; + } + } + static PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat format) { switch (format) { case Tegra::FramebufferConfig::PixelFormat::ABGR8: @@ -197,6 +209,8 @@ struct SurfaceParams { return PixelFormat::DXT45; case Tegra::Texture::TextureFormat::DXN1: return PixelFormat::DXN1; + case Tegra::Texture::TextureFormat::ASTC_2D_4X4: + return PixelFormat::ASTC_2D_4X4; default: NGLOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); UNREACHABLE(); @@ -228,6 +242,8 @@ struct SurfaceParams { return Tegra::Texture::TextureFormat::DXT45; case PixelFormat::DXN1: return Tegra::Texture::TextureFormat::DXN1; + case PixelFormat::ASTC_2D_4X4: + return Tegra::Texture::TextureFormat::ASTC_2D_4X4; default: UNREACHABLE(); } |