diff options
Diffstat (limited to 'src/video_core/surface.cpp')
| -rw-r--r-- | src/video_core/surface.cpp | 15 |
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) | |||
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | SurfaceType GetFormatType(PixelFormat pixel_format) { | 216 | SurfaceType GetFormatType(PixelFormat pixel_format) { |
| 217 | if (static_cast<std::size_t>(pixel_format) < | 217 | if (pixel_format < PixelFormat::MaxColorFormat) { |
| 218 | static_cast<std::size_t>(PixelFormat::MaxColorFormat)) { | ||
| 219 | return SurfaceType::ColorTexture; | 218 | return SurfaceType::ColorTexture; |
| 220 | } | 219 | } |
| 221 | 220 | if (pixel_format < PixelFormat::MaxDepthFormat) { | |
| 222 | if (static_cast<std::size_t>(pixel_format) < | ||
| 223 | static_cast<std::size_t>(PixelFormat::MaxDepthFormat)) { | ||
| 224 | return SurfaceType::Depth; | 221 | return SurfaceType::Depth; |
| 225 | } | 222 | } |
| 226 | 223 | if (pixel_format < PixelFormat::MaxStencilFormat) { | |
| 227 | if (static_cast<std::size_t>(pixel_format) < | ||
| 228 | static_cast<std::size_t>(PixelFormat::MaxStencilFormat)) { | ||
| 229 | return SurfaceType::Stencil; | 224 | return SurfaceType::Stencil; |
| 230 | } | 225 | } |
| 231 | 226 | if (pixel_format < PixelFormat::MaxDepthStencilFormat) { | |
| 232 | if (static_cast<std::size_t>(pixel_format) < | ||
| 233 | static_cast<std::size_t>(PixelFormat::MaxDepthStencilFormat)) { | ||
| 234 | return SurfaceType::DepthStencil; | 227 | return SurfaceType::DepthStencil; |
| 235 | } | 228 | } |
| 236 | 229 | ||