summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer_cache.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-16 03:24:04 +0200
committerbunnei <bunneidev@gmail.com>2018-08-16 03:24:04 +0200
commit89c3d6a2a370997e5ba502a37d1065534e0b2992 (patch)
treec2d99245e7da60f83cecf0f2d8e5dd9171784d5e /src/video_core/renderer_opengl/gl_rasterizer_cache.h
parentMerge pull request #1079 from lioncash/fmt (diff)
downloadyuzu-89c3d6a2a370997e5ba502a37d1065534e0b2992.tar
yuzu-89c3d6a2a370997e5ba502a37d1065534e0b2992.tar.gz
yuzu-89c3d6a2a370997e5ba502a37d1065534e0b2992.tar.bz2
yuzu-89c3d6a2a370997e5ba502a37d1065534e0b2992.tar.lz
yuzu-89c3d6a2a370997e5ba502a37d1065534e0b2992.tar.xz
yuzu-89c3d6a2a370997e5ba502a37d1065534e0b2992.tar.zst
yuzu-89c3d6a2a370997e5ba502a37d1065534e0b2992.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
index 55cf3782c..beec01746 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
@@ -68,11 +68,15 @@ struct SurfaceParams {
MaxColorFormat,
+ // Depth formats
+ Z32F = 42,
+ Z16 = 43,
+
+ MaxDepthFormat,
+
// DepthStencil formats
- Z24S8 = 42,
- S8Z24 = 43,
- Z32F = 44,
- Z16 = 45,
+ Z24S8 = 44,
+ S8Z24 = 45,
Z32FS8 = 46,
MaxDepthStencilFormat,
@@ -153,10 +157,10 @@ struct SurfaceParams {
1, // RG8S
1, // RG32UI
1, // R32UI
- 1, // Z24S8
- 1, // S8Z24
1, // Z32F
1, // Z16
+ 1, // Z24S8
+ 1, // S8Z24
1, // Z32FS8
}};
@@ -211,10 +215,10 @@ struct SurfaceParams {
16, // RG8S
64, // RG32UI
32, // R32UI
- 32, // Z24S8
- 32, // S8Z24
32, // Z32F
16, // Z16
+ 32, // Z24S8
+ 32, // S8Z24
64, // Z32FS8
}};
@@ -587,6 +591,10 @@ struct SurfaceParams {
return SurfaceType::ColorTexture;
}
+ if (static_cast<size_t>(pixel_format) < static_cast<size_t>(PixelFormat::MaxDepthFormat)) {
+ return SurfaceType::Depth;
+ }
+
if (static_cast<size_t>(pixel_format) <
static_cast<size_t>(PixelFormat::MaxDepthStencilFormat)) {
return SurfaceType::DepthStencil;