diff options
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 800d239d9..fc864c56f 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -41,14 +41,17 @@ struct SurfaceParams { RGBA32F = 16, RG32F = 17, R32F = 18, + R16F = 19, + R16UNORM = 20, MaxColorFormat, // DepthStencil formats - Z24S8 = 19, - S8Z24 = 20, - Z32F = 21, - Z16 = 22, + Z24S8 = 21, + S8Z24 = 22, + Z32F = 23, + Z16 = 24, + Z32FS8 = 25, MaxDepthStencilFormat, @@ -105,10 +108,13 @@ struct SurfaceParams { 1, // RGBA32F 1, // RG32F 1, // R32F + 1, // R16F + 1, // R16UNORM 1, // Z24S8 1, // S8Z24 1, // Z32F 1, // Z16 + 1, // Z32FS8 }}; ASSERT(static_cast<size_t>(format) < compression_factor_table.size()); @@ -139,10 +145,13 @@ struct SurfaceParams { 128, // RGBA32F 64, // RG32F 32, // R32F + 16, // R16F + 16, // R16UNORM 32, // Z24S8 32, // S8Z24 32, // Z32F 16, // Z16 + 64, // Z32FS8 }}; ASSERT(static_cast<size_t>(format) < bpp_table.size()); @@ -163,6 +172,8 @@ struct SurfaceParams { return PixelFormat::Z32F; case Tegra::DepthFormat::Z16_UNORM: return PixelFormat::Z16; + case Tegra::DepthFormat::Z32_S8_X24_FLOAT: + return PixelFormat::Z32FS8; default: LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); UNREACHABLE(); @@ -188,6 +199,8 @@ struct SurfaceParams { return PixelFormat::R11FG11FB10F; case Tegra::RenderTargetFormat::RGBA32_UINT: return PixelFormat::RGBA32UI; + case Tegra::RenderTargetFormat::R8_UNORM: + return PixelFormat::R8; default: LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); UNREACHABLE(); @@ -226,8 +239,22 @@ struct SurfaceParams { UNREACHABLE(); case Tegra::Texture::TextureFormat::R32_G32: return PixelFormat::RG32F; + case Tegra::Texture::TextureFormat::R16: + switch (component_type) { + case Tegra::Texture::ComponentType::FLOAT: + return PixelFormat::R16F; + case Tegra::Texture::ComponentType::UNORM: + return PixelFormat::R16UNORM; + } + LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", + static_cast<u32>(component_type)); + UNREACHABLE(); case Tegra::Texture::TextureFormat::R32: return PixelFormat::R32F; + case Tegra::Texture::TextureFormat::ZF32: + return PixelFormat::Z32F; + case Tegra::Texture::TextureFormat::Z24S8: + return PixelFormat::Z24S8; case Tegra::Texture::TextureFormat::DXT1: return PixelFormat::DXT1; case Tegra::Texture::TextureFormat::DXT23: @@ -290,6 +317,13 @@ struct SurfaceParams { return Tegra::Texture::TextureFormat::R32_G32; case PixelFormat::R32F: return Tegra::Texture::TextureFormat::R32; + case PixelFormat::R16F: + case PixelFormat::R16UNORM: + return Tegra::Texture::TextureFormat::R16; + case PixelFormat::Z32F: + return Tegra::Texture::TextureFormat::ZF32; + case PixelFormat::Z24S8: + return Tegra::Texture::TextureFormat::Z24S8; default: LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); UNREACHABLE(); @@ -306,6 +340,8 @@ struct SurfaceParams { return Tegra::DepthFormat::Z32_FLOAT; case PixelFormat::Z16: return Tegra::DepthFormat::Z16_UNORM; + case PixelFormat::Z32FS8: + return Tegra::DepthFormat::Z32_S8_X24_FLOAT; default: LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); UNREACHABLE(); @@ -332,6 +368,7 @@ struct SurfaceParams { case Tegra::RenderTargetFormat::RGBA8_SRGB: case Tegra::RenderTargetFormat::BGRA8_UNORM: case Tegra::RenderTargetFormat::RGB10_A2_UNORM: + case Tegra::RenderTargetFormat::R8_UNORM: return ComponentType::UNorm; case Tegra::RenderTargetFormat::RGBA16_FLOAT: case Tegra::RenderTargetFormat::R11G11B10_FLOAT: @@ -363,6 +400,7 @@ struct SurfaceParams { case Tegra::DepthFormat::Z24_S8_UNORM: return ComponentType::UNorm; case Tegra::DepthFormat::Z32_FLOAT: + case Tegra::DepthFormat::Z32_S8_X24_FLOAT: return ComponentType::Float; default: LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |