From 2348eb41f38a6e52e52d121adfc4c605763209a7 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 17 Nov 2021 15:04:38 -0500 Subject: video_core: Add S8_UINT stencil format --- src/video_core/surface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/video_core/surface.cpp') 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: @@ -213,6 +215,11 @@ SurfaceType GetFormatType(PixelFormat pixel_format) { return SurfaceType::Depth; } + if (static_cast(pixel_format) < + static_cast(PixelFormat::MaxStencilFormat)) { + return SurfaceType::Stencil; + } + if (static_cast(pixel_format) < static_cast(PixelFormat::MaxDepthStencilFormat)) { return SurfaceType::DepthStencil; -- cgit v1.2.3