summaryrefslogtreecommitdiff
path: root/src/video_core/surface.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-11-19 01:16:49 -0800
committerGitHub <noreply@github.com>2021-11-19 01:16:49 -0800
commitc45af76ea0f19a76a7fa99e37d296aa2fabf0395 (patch)
treeffb440bd7ee2f624164cc7f1f912db7a81ca06c5 /src/video_core/surface.h
parent0bc46fedd617f6a42c53716680ed99d8f42bf99a (diff)
parentdc61b7045b7ffc3cfe46f0b71f84d5fe709de6c9 (diff)
Merge pull request #7357 from Morph1984/s8_uint
video_core: Implement S8_UINT format
Diffstat (limited to 'src/video_core/surface.h')
-rw-r--r--src/video_core/surface.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/video_core/surface.h b/src/video_core/surface.h
index 2ce7c7d33..33e8d24ab 100644
--- a/src/video_core/surface.h
+++ b/src/video_core/surface.h
@@ -110,8 +110,12 @@ enum class PixelFormat {
MaxDepthFormat,
+ // Stencil formats
+ S8_UINT = MaxDepthFormat,
+ MaxStencilFormat,
+
// DepthStencil formats
- D24_UNORM_S8_UINT = MaxDepthFormat,
+ D24_UNORM_S8_UINT = MaxStencilFormat,
S8_UINT_D24_UNORM,
D32_FLOAT_S8_UINT,
@@ -125,8 +129,9 @@ constexpr std::size_t MaxPixelFormat = static_cast<std::size_t>(PixelFormat::Max
enum class SurfaceType {
ColorTexture = 0,
Depth = 1,
- DepthStencil = 2,
- Invalid = 3,
+ Stencil = 2,
+ DepthStencil = 3,
+ Invalid = 4,
};
enum class SurfaceTarget {
@@ -229,6 +234,7 @@ constexpr std::array<u32, MaxPixelFormat> BLOCK_WIDTH_TABLE = {{
1, // E5B9G9R9_FLOAT
1, // D32_FLOAT
1, // D16_UNORM
+ 1, // S8_UINT
1, // D24_UNORM_S8_UINT
1, // S8_UINT_D24_UNORM
1, // D32_FLOAT_S8_UINT
@@ -328,6 +334,7 @@ constexpr std::array<u32, MaxPixelFormat> BLOCK_HEIGHT_TABLE = {{
1, // E5B9G9R9_FLOAT
1, // D32_FLOAT
1, // D16_UNORM
+ 1, // S8_UINT
1, // D24_UNORM_S8_UINT
1, // S8_UINT_D24_UNORM
1, // D32_FLOAT_S8_UINT
@@ -427,6 +434,7 @@ constexpr std::array<u32, MaxPixelFormat> BITS_PER_BLOCK_TABLE = {{
32, // E5B9G9R9_FLOAT
32, // D32_FLOAT
16, // D16_UNORM
+ 8, // S8_UINT
32, // D24_UNORM_S8_UINT
32, // S8_UINT_D24_UNORM
64, // D32_FLOAT_S8_UINT