summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-11-29 02:25:41 +0100
committerLioncash <mathew1800@gmail.com>2022-11-29 02:25:44 +0100
commita9efea8ae984fee95cf10002093dcca86c1d3dab (patch)
tree5018c664bda89557361f9d30f18002b44a234a1b /src/video_core
parentMerge pull request #9325 from german77/default_by_default (diff)
downloadyuzu-a9efea8ae984fee95cf10002093dcca86c1d3dab.tar
yuzu-a9efea8ae984fee95cf10002093dcca86c1d3dab.tar.gz
yuzu-a9efea8ae984fee95cf10002093dcca86c1d3dab.tar.bz2
yuzu-a9efea8ae984fee95cf10002093dcca86c1d3dab.tar.lz
yuzu-a9efea8ae984fee95cf10002093dcca86c1d3dab.tar.xz
yuzu-a9efea8ae984fee95cf10002093dcca86c1d3dab.tar.zst
yuzu-a9efea8ae984fee95cf10002093dcca86c1d3dab.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/surface.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index b618e1a25..1a76d4178 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -214,23 +214,16 @@ PixelFormat PixelFormatFromGPUPixelFormat(Service::android::PixelFormat format)
}
SurfaceType GetFormatType(PixelFormat pixel_format) {
- if (static_cast<std::size_t>(pixel_format) <
- static_cast<std::size_t>(PixelFormat::MaxColorFormat)) {
+ if (pixel_format < PixelFormat::MaxColorFormat) {
return SurfaceType::ColorTexture;
}
-
- if (static_cast<std::size_t>(pixel_format) <
- static_cast<std::size_t>(PixelFormat::MaxDepthFormat)) {
+ if (pixel_format < PixelFormat::MaxDepthFormat) {
return SurfaceType::Depth;
}
-
- if (static_cast<std::size_t>(pixel_format) <
- static_cast<std::size_t>(PixelFormat::MaxStencilFormat)) {
+ if (pixel_format < PixelFormat::MaxStencilFormat) {
return SurfaceType::Stencil;
}
-
- if (static_cast<std::size_t>(pixel_format) <
- static_cast<std::size_t>(PixelFormat::MaxDepthStencilFormat)) {
+ if (pixel_format < PixelFormat::MaxDepthStencilFormat) {
return SurfaceType::DepthStencil;
}