diff options
| author | 2023-10-06 00:58:30 +0100 | |
|---|---|---|
| committer | 2023-10-06 00:58:30 +0100 | |
| commit | ad1a9f3d3af3ffb49a81e0c9d27301b824d9f7dd (patch) | |
| tree | a17657370a25a30ced37cd016356c2b0d3102be3 /src/video_core/texture_cache | |
| parent | Merge pull request #11657 from liamwhite/new-codespell (diff) | |
| download | yuzu-ad1a9f3d3af3ffb49a81e0c9d27301b824d9f7dd.tar.gz yuzu-ad1a9f3d3af3ffb49a81e0c9d27301b824d9f7dd.tar.xz yuzu-ad1a9f3d3af3ffb49a81e0c9d27301b824d9f7dd.zip | |
Implement X8_D24 format
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/format_lookup_table.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/texture_cache/formatter.h | 2 | ||||
| -rw-r--r-- | src/video_core/texture_cache/image_view_base.cpp | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp index 56307d030..3162c8f5e 100644 --- a/src/video_core/texture_cache/format_lookup_table.cpp +++ b/src/video_core/texture_cache/format_lookup_table.cpp | |||
| @@ -142,6 +142,10 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red, | |||
| 142 | return PixelFormat::D16_UNORM; | 142 | return PixelFormat::D16_UNORM; |
| 143 | case Hash(TextureFormat::Z16, UNORM, UINT, UINT, UINT, LINEAR): | 143 | case Hash(TextureFormat::Z16, UNORM, UINT, UINT, UINT, LINEAR): |
| 144 | return PixelFormat::D16_UNORM; | 144 | return PixelFormat::D16_UNORM; |
| 145 | case Hash(TextureFormat::X8Z24, UNORM): | ||
| 146 | return PixelFormat::X8_D24_UNORM; | ||
| 147 | case Hash(TextureFormat::X8Z24, UNORM, UINT, UINT, UINT, LINEAR): | ||
| 148 | return PixelFormat::X8_D24_UNORM; | ||
| 145 | case Hash(TextureFormat::Z24S8, UINT, UNORM, UNORM, UNORM, LINEAR): | 149 | case Hash(TextureFormat::Z24S8, UINT, UNORM, UNORM, UNORM, LINEAR): |
| 146 | return PixelFormat::S8_UINT_D24_UNORM; | 150 | return PixelFormat::S8_UINT_D24_UNORM; |
| 147 | case Hash(TextureFormat::Z24S8, UINT, UNORM, UINT, UINT, LINEAR): | 151 | case Hash(TextureFormat::Z24S8, UINT, UNORM, UINT, UINT, LINEAR): |
diff --git a/src/video_core/texture_cache/formatter.h b/src/video_core/texture_cache/formatter.h index 9ee57a076..cabbfcb2d 100644 --- a/src/video_core/texture_cache/formatter.h +++ b/src/video_core/texture_cache/formatter.h | |||
| @@ -211,6 +211,8 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str | |||
| 211 | return "D32_FLOAT"; | 211 | return "D32_FLOAT"; |
| 212 | case PixelFormat::D16_UNORM: | 212 | case PixelFormat::D16_UNORM: |
| 213 | return "D16_UNORM"; | 213 | return "D16_UNORM"; |
| 214 | case PixelFormat::X8_D24_UNORM: | ||
| 215 | return "X8_D24_UNORM"; | ||
| 214 | case PixelFormat::S8_UINT: | 216 | case PixelFormat::S8_UINT: |
| 215 | return "S8_UINT"; | 217 | return "S8_UINT"; |
| 216 | case PixelFormat::D24_UNORM_S8_UINT: | 218 | case PixelFormat::D24_UNORM_S8_UINT: |
diff --git a/src/video_core/texture_cache/image_view_base.cpp b/src/video_core/texture_cache/image_view_base.cpp index 0c5f4450d..18b9250f9 100644 --- a/src/video_core/texture_cache/image_view_base.cpp +++ b/src/video_core/texture_cache/image_view_base.cpp | |||
| @@ -85,6 +85,7 @@ bool ImageViewBase::SupportsAnisotropy() const noexcept { | |||
| 85 | // Depth formats | 85 | // Depth formats |
| 86 | case PixelFormat::D32_FLOAT: | 86 | case PixelFormat::D32_FLOAT: |
| 87 | case PixelFormat::D16_UNORM: | 87 | case PixelFormat::D16_UNORM: |
| 88 | case PixelFormat::X8_D24_UNORM: | ||
| 88 | // Stencil formats | 89 | // Stencil formats |
| 89 | case PixelFormat::S8_UINT: | 90 | case PixelFormat::S8_UINT: |
| 90 | // DepthStencil formats | 91 | // DepthStencil formats |