diff options
| author | bunnei <bunneidev@gmail.com> | 2018-07-14 21:39:23 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-14 21:39:23 -0700 |
| commit | f8ab95618935092b70aaeca571e5bcb21ee2c143 (patch) | |
| tree | d924ea8185ab9a6e9da0421b5c56f2628a61418f /src/video_core/textures/decoders.cpp | |
| parent | 2cb3fdca86192d5dd2f3c988b5d57732c0bee6dc (diff) | |
| parent | e21190f47f2fdc0b24f1220700640ed854972ccc (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.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) { 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: |
