summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-11-29 14:26:39 +0100
committerGitHub <noreply@github.com>2022-11-29 14:26:39 +0100
commit55b546a1102ba88e0c0813ff6cefc5b1a3a16f34 (patch)
tree1a0c5a7f10d4c0ccef76a0d089dcbcb5a86445b8 /src
parentMerge pull request #9346 from lioncash/vtable (diff)
parentvideo_core/surface: Eliminate casts in GetFormatType() (diff)
downloadyuzu-55b546a1102ba88e0c0813ff6cefc5b1a3a16f34.tar
yuzu-55b546a1102ba88e0c0813ff6cefc5b1a3a16f34.tar.gz
yuzu-55b546a1102ba88e0c0813ff6cefc5b1a3a16f34.tar.bz2
yuzu-55b546a1102ba88e0c0813ff6cefc5b1a3a16f34.tar.lz
yuzu-55b546a1102ba88e0c0813ff6cefc5b1a3a16f34.tar.xz
yuzu-55b546a1102ba88e0c0813ff6cefc5b1a3a16f34.tar.zst
yuzu-55b546a1102ba88e0c0813ff6cefc5b1a3a16f34.zip
Diffstat (limited to 'src')
-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;
}