summaryrefslogtreecommitdiff
path: root/src/video_core/textures/decoders.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-07-03 14:05:13 -0400
committerGravatar bunnei2018-07-03 14:58:13 -0400
commit9da1552417440ca2294f9e06d33be42d933db117 (patch)
tree8f6e486e5a74b936aba268eb2599fa7bb1e43bb8 /src/video_core/textures/decoders.cpp
parentUpdate AudioRenderer Voice Sections (#614) (diff)
downloadyuzu-9da1552417440ca2294f9e06d33be42d933db117.tar.gz
yuzu-9da1552417440ca2294f9e06d33be42d933db117.tar.xz
yuzu-9da1552417440ca2294f9e06d33be42d933db117.zip
gl_rasterizer_cache: Implement PixelFormat S8Z24.
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
-rw-r--r--src/video_core/textures/decoders.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index 680f22ddb..7b06fea3e 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -76,6 +76,7 @@ u32 BytesPerPixel(TextureFormat format) {
76 76
77static u32 DepthBytesPerPixel(DepthFormat format) { 77static u32 DepthBytesPerPixel(DepthFormat format) {
78 switch (format) { 78 switch (format) {
79 case DepthFormat::S8_Z24_UNORM:
79 case DepthFormat::Z24_S8_UNORM: 80 case DepthFormat::Z24_S8_UNORM:
80 return 4; 81 return 4;
81 default: 82 default:
@@ -129,6 +130,7 @@ std::vector<u8> UnswizzleDepthTexture(VAddr address, DepthFormat format, u32 wid
129 std::vector<u8> unswizzled_data(width * height * bytes_per_pixel); 130 std::vector<u8> unswizzled_data(width * height * bytes_per_pixel);
130 131
131 switch (format) { 132 switch (format) {
133 case DepthFormat::S8_Z24_UNORM:
132 case DepthFormat::Z24_S8_UNORM: 134 case DepthFormat::Z24_S8_UNORM:
133 CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, 135 CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data,
134 unswizzled_data.data(), true, block_height); 136 unswizzled_data.data(), true, block_height);