diff options
| author | 2018-07-14 21:39:23 -0700 | |
|---|---|---|
| committer | 2018-07-14 21:39:23 -0700 | |
| commit | f8ab95618935092b70aaeca571e5bcb21ee2c143 (patch) | |
| tree | d924ea8185ab9a6e9da0421b5c56f2628a61418f /src/video_core/textures/decoders.cpp | |
| parent | Merge pull request #598 from bunnei/makedonecurrent (diff) | |
| parent | gl_rasterizer_cache: Implement depth format Z16_UNORM. (diff) | |
| download | yuzu-f8ab95618935092b70aaeca571e5bcb21ee2c143.tar.gz yuzu-f8ab95618935092b70aaeca571e5bcb21ee2c143.tar.xz yuzu-f8ab95618935092b70aaeca571e5bcb21ee2c143.zip | |
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.cpp | 3 |
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) { | |||
| 77 | 77 | ||
| 78 | static u32 DepthBytesPerPixel(DepthFormat format) { | 78 | static u32 DepthBytesPerPixel(DepthFormat format) { |
| 79 | switch (format) { | 79 | switch (format) { |
| 80 | case DepthFormat::Z16_UNORM: | ||
| 81 | return 2; | ||
| 80 | case DepthFormat::S8_Z24_UNORM: | 82 | case DepthFormat::S8_Z24_UNORM: |
| 81 | case DepthFormat::Z24_S8_UNORM: | 83 | case DepthFormat::Z24_S8_UNORM: |
| 82 | case DepthFormat::Z32_FLOAT: | 84 | case DepthFormat::Z32_FLOAT: |
| @@ -133,6 +135,7 @@ std::vector<u8> UnswizzleDepthTexture(VAddr address, DepthFormat format, u32 wid | |||
| 133 | std::vector<u8> unswizzled_data(width * height * bytes_per_pixel); | 135 | std::vector<u8> unswizzled_data(width * height * bytes_per_pixel); |
| 134 | 136 | ||
| 135 | switch (format) { | 137 | switch (format) { |
| 138 | case DepthFormat::Z16_UNORM: | ||
| 136 | case DepthFormat::S8_Z24_UNORM: | 139 | case DepthFormat::S8_Z24_UNORM: |
| 137 | case DepthFormat::Z24_S8_UNORM: | 140 | case DepthFormat::Z24_S8_UNORM: |
| 138 | case DepthFormat::Z32_FLOAT: | 141 | case DepthFormat::Z32_FLOAT: |