diff options
author | bunnei <bunneidev@gmail.com> | 2021-11-19 10:16:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 10:16:49 +0100 |
commit | c45af76ea0f19a76a7fa99e37d296aa2fabf0395 (patch) | |
tree | ffb440bd7ee2f624164cc7f1f912db7a81ca06c5 /src/video_core/surface.cpp | |
parent | Merge pull request #7349 from ameerj/ogl-convert-image (diff) | |
parent | renderer_vulkan: Implement S8_UINT stencil format (diff) | |
download | yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.gz yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.bz2 yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.lz yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.xz yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.zst yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.zip |
Diffstat (limited to 'src/video_core/surface.cpp')
-rw-r--r-- | src/video_core/surface.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 58d262446..a36015c8c 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp @@ -82,6 +82,8 @@ PixelFormat PixelFormatFromDepthFormat(Tegra::DepthFormat format) { return PixelFormat::D32_FLOAT; case Tegra::DepthFormat::D16_UNORM: return PixelFormat::D16_UNORM; + case Tegra::DepthFormat::S8_UINT: + return PixelFormat::S8_UINT; case Tegra::DepthFormat::D32_FLOAT_S8X24_UINT: return PixelFormat::D32_FLOAT_S8_UINT; default: @@ -214,6 +216,11 @@ SurfaceType GetFormatType(PixelFormat pixel_format) { } if (static_cast<std::size_t>(pixel_format) < + static_cast<std::size_t>(PixelFormat::MaxStencilFormat)) { + return SurfaceType::Stencil; + } + + if (static_cast<std::size_t>(pixel_format) < static_cast<std::size_t>(PixelFormat::MaxDepthStencilFormat)) { return SurfaceType::DepthStencil; } |