diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-30 00:33:56 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-30 03:49:02 +0100 |
commit | f58a6152fc89626e4a8f1746af46e9260d17d404 (patch) | |
tree | 1a7d46460ca7f43c2f7b38be5829736597ffb1e6 /src/video_core/surface.cpp | |
parent | hle/ipc_helpers: Fix clang-format warnings (diff) | |
download | yuzu-f58a6152fc89626e4a8f1746af46e9260d17d404.tar yuzu-f58a6152fc89626e4a8f1746af46e9260d17d404.tar.gz yuzu-f58a6152fc89626e4a8f1746af46e9260d17d404.tar.bz2 yuzu-f58a6152fc89626e4a8f1746af46e9260d17d404.tar.lz yuzu-f58a6152fc89626e4a8f1746af46e9260d17d404.tar.xz yuzu-f58a6152fc89626e4a8f1746af46e9260d17d404.tar.zst yuzu-f58a6152fc89626e4a8f1746af46e9260d17d404.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/surface.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 1a344229f..2f6612a35 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp @@ -50,6 +50,24 @@ bool SurfaceTargetIsLayered(SurfaceTarget target) { } } +bool SurfaceTargetIsArray(SurfaceTarget target) { + switch (target) { + case SurfaceTarget::Texture1D: + case SurfaceTarget::Texture2D: + case SurfaceTarget::Texture3D: + case SurfaceTarget::TextureCubemap: + return false; + case SurfaceTarget::Texture1DArray: + case SurfaceTarget::Texture2DArray: + case SurfaceTarget::TextureCubeArray: + return true; + default: + LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", static_cast<u32>(target)); + UNREACHABLE(); + return false; + } +} + PixelFormat PixelFormatFromDepthFormat(Tegra::DepthFormat format) { switch (format) { case Tegra::DepthFormat::S8_Z24_UNORM: |