aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/textures/decoders.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-14 21:39:23 -0700
committerGitHub <noreply@github.com>2018-07-14 21:39:23 -0700
commitf8ab95618935092b70aaeca571e5bcb21ee2c143 (patch)
treed924ea8185ab9a6e9da0421b5c56f2628a61418f /src/video_core/textures/decoders.cpp
parent2cb3fdca86192d5dd2f3c988b5d57732c0bee6dc (diff)
parente21190f47f2fdc0b24f1220700640ed854972ccc (diff)
Merge pull request #659 from bunnei/depth16
gl_rasterizer_cache: Implement depth format Z16_UNORM.
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
-rw-r--r--src/video_core/textures/decoders.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index b3937b2fe..a4ba9f66a 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -77,6 +77,8 @@ u32 BytesPerPixel(TextureFormat format) {
static u32 DepthBytesPerPixel(DepthFormat format) {
switch (format) {
+ case DepthFormat::Z16_UNORM:
+ return 2;
case DepthFormat::S8_Z24_UNORM:
case DepthFormat::Z24_S8_UNORM:
case DepthFormat::Z32_FLOAT:
@@ -133,6 +135,7 @@ std::vector<u8> UnswizzleDepthTexture(VAddr address, DepthFormat format, u32 wid
std::vector<u8> unswizzled_data(width * height * bytes_per_pixel);
switch (format) {
+ case DepthFormat::Z16_UNORM:
case DepthFormat::S8_Z24_UNORM:
case DepthFormat::Z24_S8_UNORM:
case DepthFormat::Z32_FLOAT: