diff options
author | Subv <subv2112@gmail.com> | 2018-07-25 16:52:39 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-07-25 16:52:39 +0200 |
commit | c5b838aeefd2fbd0fdce2f60e894a0b4e0555686 (patch) | |
tree | ddd6ab55053a0902ecd3bcfee68bee41735f7d70 /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | Merge pull request #816 from Subv/z32_s8 (diff) | |
download | yuzu-c5b838aeefd2fbd0fdce2f60e894a0b4e0555686.tar yuzu-c5b838aeefd2fbd0fdce2f60e894a0b4e0555686.tar.gz yuzu-c5b838aeefd2fbd0fdce2f60e894a0b4e0555686.tar.bz2 yuzu-c5b838aeefd2fbd0fdce2f60e894a0b4e0555686.tar.lz yuzu-c5b838aeefd2fbd0fdce2f60e894a0b4e0555686.tar.xz yuzu-c5b838aeefd2fbd0fdce2f60e894a0b4e0555686.tar.zst yuzu-c5b838aeefd2fbd0fdce2f60e894a0b4e0555686.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 0267dbac6..cdf4eae79 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -43,15 +43,16 @@ struct SurfaceParams { R32F = 18, R16F = 19, R16UNORM = 20, + SRGBA8 = 21, MaxColorFormat, // DepthStencil formats - Z24S8 = 21, - S8Z24 = 22, - Z32F = 23, - Z16 = 24, - Z32FS8 = 25, + Z24S8 = 22, + S8Z24 = 23, + Z32F = 24, + Z16 = 25, + Z32FS8 = 26, MaxDepthStencilFormat, @@ -110,6 +111,7 @@ struct SurfaceParams { 1, // R32F 1, // R16F 1, // R16UNORM + 1, // SRGBA8 1, // Z24S8 1, // S8Z24 1, // Z32F @@ -147,6 +149,7 @@ struct SurfaceParams { 32, // R32F 16, // R16F 16, // R16UNORM + 32, // SRGBA8 32, // Z24S8 32, // S8Z24 32, // Z32F @@ -182,8 +185,9 @@ struct SurfaceParams { static PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) { switch (format) { - case Tegra::RenderTargetFormat::RGBA8_UNORM: case Tegra::RenderTargetFormat::RGBA8_SRGB: + return PixelFormat::SRGBA8; + case Tegra::RenderTargetFormat::RGBA8_UNORM: return PixelFormat::ABGR8; case Tegra::RenderTargetFormat::BGRA8_UNORM: return PixelFormat::BGRA8; @@ -276,6 +280,7 @@ struct SurfaceParams { // TODO(Subv): Properly implement this switch (format) { case PixelFormat::ABGR8: + case PixelFormat::SRGBA8: return Tegra::Texture::TextureFormat::A8R8G8B8; case PixelFormat::B5G6R5: return Tegra::Texture::TextureFormat::B5G6R5; |