From 89c3d6a2a370997e5ba502a37d1065534e0b2992 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 15 Aug 2018 21:24:04 -0400 Subject: gl_rasterizer_cache: Treat Depth formats differently from DepthStencil. --- src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.cpp') diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index b6947b97b..ac4db82cf 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -142,14 +142,16 @@ static constexpr std::array tex_form {GL_RG32UI, GL_RG_INTEGER, GL_UNSIGNED_INT, ComponentType::UInt, false}, // RG32UI {GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT, ComponentType::UInt, false}, // R32UI + // Depth formats + {GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, ComponentType::Float, false}, // Z32F + {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, ComponentType::UNorm, + false}, // Z16 + // DepthStencil formats {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm, false}, // Z24S8 {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm, - false}, // S8Z24 - {GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, ComponentType::Float, false}, // Z32F - {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, ComponentType::UNorm, - false}, // Z16 + false}, // S8Z24 {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, ComponentType::Float, false}, // Z32FS8 }}; @@ -283,10 +285,10 @@ static constexpr std::array&, Tegra::GPU MortonCopy, MortonCopy, MortonCopy, - MortonCopy, - MortonCopy, MortonCopy, MortonCopy, + MortonCopy, + MortonCopy, MortonCopy, // clang-format on }; @@ -339,10 +341,10 @@ static constexpr std::array&, Tegra::GPU MortonCopy, MortonCopy, MortonCopy, - MortonCopy, - MortonCopy, MortonCopy, MortonCopy, + MortonCopy, + MortonCopy, MortonCopy, // clang-format on }; -- cgit v1.2.3