diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/gpu.h | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 26 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.h | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/surface.cpp | 7 | ||||
| -rw-r--r-- | src/video_core/surface.h | 14 | ||||
| -rw-r--r-- | src/video_core/texture_cache/formatter.h | 2 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 10 |
10 files changed, 64 insertions, 9 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 05e5c94f3..c89a5d693 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -83,6 +83,7 @@ enum class DepthFormat : u32 { | |||
| 83 | S8_UINT_Z24_UNORM = 0x14, | 83 | S8_UINT_Z24_UNORM = 0x14, |
| 84 | D24X8_UNORM = 0x15, | 84 | D24X8_UNORM = 0x15, |
| 85 | D24S8_UNORM = 0x16, | 85 | D24S8_UNORM = 0x16, |
| 86 | S8_UINT = 0x17, | ||
| 86 | D24C8_UNORM = 0x18, | 87 | D24C8_UNORM = 0x18, |
| 87 | D32_FLOAT_S8X24_UINT = 0x19, | 88 | D32_FLOAT_S8X24_UINT = 0x19, |
| 88 | }; | 89 | }; |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 6956535e5..9e7850428 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -148,6 +148,8 @@ GLenum AttachmentType(PixelFormat format) { | |||
| 148 | switch (const SurfaceType type = VideoCore::Surface::GetFormatType(format); type) { | 148 | switch (const SurfaceType type = VideoCore::Surface::GetFormatType(format); type) { |
| 149 | case SurfaceType::Depth: | 149 | case SurfaceType::Depth: |
| 150 | return GL_DEPTH_ATTACHMENT; | 150 | return GL_DEPTH_ATTACHMENT; |
| 151 | case SurfaceType::Stencil: | ||
| 152 | return GL_STENCIL_ATTACHMENT; | ||
| 151 | case SurfaceType::DepthStencil: | 153 | case SurfaceType::DepthStencil: |
| 152 | return GL_DEPTH_STENCIL_ATTACHMENT; | 154 | return GL_DEPTH_STENCIL_ATTACHMENT; |
| 153 | default: | 155 | default: |
| @@ -907,6 +909,8 @@ void Image::Scale(bool up_scale) { | |||
| 907 | return GL_COLOR_ATTACHMENT0; | 909 | return GL_COLOR_ATTACHMENT0; |
| 908 | case SurfaceType::Depth: | 910 | case SurfaceType::Depth: |
| 909 | return GL_DEPTH_ATTACHMENT; | 911 | return GL_DEPTH_ATTACHMENT; |
| 912 | case SurfaceType::Stencil: | ||
| 913 | return GL_STENCIL_ATTACHMENT; | ||
| 910 | case SurfaceType::DepthStencil: | 914 | case SurfaceType::DepthStencil: |
| 911 | return GL_DEPTH_STENCIL_ATTACHMENT; | 915 | return GL_DEPTH_STENCIL_ATTACHMENT; |
| 912 | default: | 916 | default: |
| @@ -920,8 +924,10 @@ void Image::Scale(bool up_scale) { | |||
| 920 | return GL_COLOR_BUFFER_BIT; | 924 | return GL_COLOR_BUFFER_BIT; |
| 921 | case SurfaceType::Depth: | 925 | case SurfaceType::Depth: |
| 922 | return GL_DEPTH_BUFFER_BIT; | 926 | return GL_DEPTH_BUFFER_BIT; |
| 927 | case SurfaceType::Stencil: | ||
| 928 | return GL_STENCIL_BUFFER_BIT; | ||
| 923 | case SurfaceType::DepthStencil: | 929 | case SurfaceType::DepthStencil: |
| 924 | return GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; | 930 | return GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; |
| 925 | default: | 931 | default: |
| 926 | UNREACHABLE(); | 932 | UNREACHABLE(); |
| 927 | return GL_COLOR_BUFFER_BIT; | 933 | return GL_COLOR_BUFFER_BIT; |
| @@ -933,8 +939,10 @@ void Image::Scale(bool up_scale) { | |||
| 933 | return 0; | 939 | return 0; |
| 934 | case SurfaceType::Depth: | 940 | case SurfaceType::Depth: |
| 935 | return 1; | 941 | return 1; |
| 936 | case SurfaceType::DepthStencil: | 942 | case SurfaceType::Stencil: |
| 937 | return 2; | 943 | return 2; |
| 944 | case SurfaceType::DepthStencil: | ||
| 945 | return 3; | ||
| 938 | default: | 946 | default: |
| 939 | UNREACHABLE(); | 947 | UNREACHABLE(); |
| 940 | return 0; | 948 | return 0; |
| @@ -1264,10 +1272,20 @@ Framebuffer::Framebuffer(TextureCacheRuntime& runtime, std::span<ImageView*, NUM | |||
| 1264 | } | 1272 | } |
| 1265 | 1273 | ||
| 1266 | if (const ImageView* const image_view = depth_buffer; image_view) { | 1274 | if (const ImageView* const image_view = depth_buffer; image_view) { |
| 1267 | if (GetFormatType(image_view->format) == SurfaceType::DepthStencil) { | 1275 | switch (GetFormatType(image_view->format)) { |
| 1276 | case SurfaceType::Depth: | ||
| 1277 | buffer_bits |= GL_DEPTH_BUFFER_BIT; | ||
| 1278 | break; | ||
| 1279 | case SurfaceType::Stencil: | ||
| 1280 | buffer_bits |= GL_STENCIL_BUFFER_BIT; | ||
| 1281 | break; | ||
| 1282 | case SurfaceType::DepthStencil: | ||
| 1268 | buffer_bits |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; | 1283 | buffer_bits |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; |
| 1269 | } else { | 1284 | break; |
| 1285 | default: | ||
| 1286 | UNREACHABLE(); | ||
| 1270 | buffer_bits |= GL_DEPTH_BUFFER_BIT; | 1287 | buffer_bits |= GL_DEPTH_BUFFER_BIT; |
| 1288 | break; | ||
| 1271 | } | 1289 | } |
| 1272 | const GLenum attachment = AttachmentType(image_view->format); | 1290 | const GLenum attachment = AttachmentType(image_view->format); |
| 1273 | AttachTexture(handle, attachment, image_view); | 1291 | AttachTexture(handle, attachment, image_view); |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 578f8d523..40acc8fad 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h | |||
| @@ -164,8 +164,8 @@ private: | |||
| 164 | 164 | ||
| 165 | std::array<GLuint, Shader::NUM_TEXTURE_TYPES> null_image_views{}; | 165 | std::array<GLuint, Shader::NUM_TEXTURE_TYPES> null_image_views{}; |
| 166 | 166 | ||
| 167 | std::array<OGLFramebuffer, 3> rescale_draw_fbos; | 167 | std::array<OGLFramebuffer, 4> rescale_draw_fbos; |
| 168 | std::array<OGLFramebuffer, 3> rescale_read_fbos; | 168 | std::array<OGLFramebuffer, 4> rescale_read_fbos; |
| 169 | const Settings::ResolutionScalingInfo& resolution; | 169 | const Settings::ResolutionScalingInfo& resolution; |
| 170 | }; | 170 | }; |
| 171 | 171 | ||
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 39158aa3e..daba42ed9 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h | |||
| @@ -108,6 +108,7 @@ constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> FORMAT_TAB | |||
| 108 | {GL_RGB9_E5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV}, // E5B9G9R9_FLOAT | 108 | {GL_RGB9_E5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV}, // E5B9G9R9_FLOAT |
| 109 | {GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT}, // D32_FLOAT | 109 | {GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT}, // D32_FLOAT |
| 110 | {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT}, // D16_UNORM | 110 | {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT}, // D16_UNORM |
| 111 | {GL_STENCIL_INDEX8, GL_STENCIL, GL_UNSIGNED_BYTE}, // S8_UINT | ||
| 111 | {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8}, // D24_UNORM_S8_UINT | 112 | {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8}, // D24_UNORM_S8_UINT |
| 112 | {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8}, // S8_UINT_D24_UNORM | 113 | {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8}, // S8_UINT_D24_UNORM |
| 113 | {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, | 114 | {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, |
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 68a23b602..31adada56 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -208,6 +208,9 @@ struct FormatTuple { | |||
| 208 | {VK_FORMAT_D32_SFLOAT, Attachable}, // D32_FLOAT | 208 | {VK_FORMAT_D32_SFLOAT, Attachable}, // D32_FLOAT |
| 209 | {VK_FORMAT_D16_UNORM, Attachable}, // D16_UNORM | 209 | {VK_FORMAT_D16_UNORM, Attachable}, // D16_UNORM |
| 210 | 210 | ||
| 211 | // Stencil formats | ||
| 212 | {VK_FORMAT_S8_UINT, Attachable}, // S8_UINT | ||
| 213 | |||
| 211 | // DepthStencil formats | 214 | // DepthStencil formats |
| 212 | {VK_FORMAT_D24_UNORM_S8_UINT, Attachable}, // D24_UNORM_S8_UINT | 215 | {VK_FORMAT_D24_UNORM_S8_UINT, Attachable}, // D24_UNORM_S8_UINT |
| 213 | {VK_FORMAT_D24_UNORM_S8_UINT, Attachable}, // S8_UINT_D24_UNORM (emulated) | 216 | {VK_FORMAT_D24_UNORM_S8_UINT, Attachable}, // S8_UINT_D24_UNORM (emulated) |
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 407fd2a15..9bc846b94 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp | |||
| @@ -102,6 +102,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 102 | usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; | 102 | usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; |
| 103 | break; | 103 | break; |
| 104 | case VideoCore::Surface::SurfaceType::Depth: | 104 | case VideoCore::Surface::SurfaceType::Depth: |
| 105 | case VideoCore::Surface::SurfaceType::Stencil: | ||
| 105 | case VideoCore::Surface::SurfaceType::DepthStencil: | 106 | case VideoCore::Surface::SurfaceType::DepthStencil: |
| 106 | usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; | 107 | usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; |
| 107 | break; | 108 | break; |
| @@ -173,6 +174,8 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 173 | return VK_IMAGE_ASPECT_COLOR_BIT; | 174 | return VK_IMAGE_ASPECT_COLOR_BIT; |
| 174 | case VideoCore::Surface::SurfaceType::Depth: | 175 | case VideoCore::Surface::SurfaceType::Depth: |
| 175 | return VK_IMAGE_ASPECT_DEPTH_BIT; | 176 | return VK_IMAGE_ASPECT_DEPTH_BIT; |
| 177 | case VideoCore::Surface::SurfaceType::Stencil: | ||
| 178 | return VK_IMAGE_ASPECT_STENCIL_BIT; | ||
| 176 | case VideoCore::Surface::SurfaceType::DepthStencil: | 179 | case VideoCore::Surface::SurfaceType::DepthStencil: |
| 177 | return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; | 180 | return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; |
| 178 | default: | 181 | default: |
| @@ -195,6 +198,8 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 195 | case PixelFormat::D16_UNORM: | 198 | case PixelFormat::D16_UNORM: |
| 196 | case PixelFormat::D32_FLOAT: | 199 | case PixelFormat::D32_FLOAT: |
| 197 | return VK_IMAGE_ASPECT_DEPTH_BIT; | 200 | return VK_IMAGE_ASPECT_DEPTH_BIT; |
| 201 | case PixelFormat::S8_UINT: | ||
| 202 | return VK_IMAGE_ASPECT_STENCIL_BIT; | ||
| 198 | default: | 203 | default: |
| 199 | return VK_IMAGE_ASPECT_COLOR_BIT; | 204 | return VK_IMAGE_ASPECT_COLOR_BIT; |
| 200 | } | 205 | } |
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 58d262446..a36015c8c 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp | |||
| @@ -82,6 +82,8 @@ PixelFormat PixelFormatFromDepthFormat(Tegra::DepthFormat format) { | |||
| 82 | return PixelFormat::D32_FLOAT; | 82 | return PixelFormat::D32_FLOAT; |
| 83 | case Tegra::DepthFormat::D16_UNORM: | 83 | case Tegra::DepthFormat::D16_UNORM: |
| 84 | return PixelFormat::D16_UNORM; | 84 | return PixelFormat::D16_UNORM; |
| 85 | case Tegra::DepthFormat::S8_UINT: | ||
| 86 | return PixelFormat::S8_UINT; | ||
| 85 | case Tegra::DepthFormat::D32_FLOAT_S8X24_UINT: | 87 | case Tegra::DepthFormat::D32_FLOAT_S8X24_UINT: |
| 86 | return PixelFormat::D32_FLOAT_S8_UINT; | 88 | return PixelFormat::D32_FLOAT_S8_UINT; |
| 87 | default: | 89 | default: |
| @@ -214,6 +216,11 @@ SurfaceType GetFormatType(PixelFormat pixel_format) { | |||
| 214 | } | 216 | } |
| 215 | 217 | ||
| 216 | if (static_cast<std::size_t>(pixel_format) < | 218 | if (static_cast<std::size_t>(pixel_format) < |
| 219 | static_cast<std::size_t>(PixelFormat::MaxStencilFormat)) { | ||
| 220 | return SurfaceType::Stencil; | ||
| 221 | } | ||
| 222 | |||
| 223 | if (static_cast<std::size_t>(pixel_format) < | ||
| 217 | static_cast<std::size_t>(PixelFormat::MaxDepthStencilFormat)) { | 224 | static_cast<std::size_t>(PixelFormat::MaxDepthStencilFormat)) { |
| 218 | return SurfaceType::DepthStencil; | 225 | return SurfaceType::DepthStencil; |
| 219 | } | 226 | } |
diff --git a/src/video_core/surface.h b/src/video_core/surface.h index 2ce7c7d33..33e8d24ab 100644 --- a/src/video_core/surface.h +++ b/src/video_core/surface.h | |||
| @@ -110,8 +110,12 @@ enum class PixelFormat { | |||
| 110 | 110 | ||
| 111 | MaxDepthFormat, | 111 | MaxDepthFormat, |
| 112 | 112 | ||
| 113 | // Stencil formats | ||
| 114 | S8_UINT = MaxDepthFormat, | ||
| 115 | MaxStencilFormat, | ||
| 116 | |||
| 113 | // DepthStencil formats | 117 | // DepthStencil formats |
| 114 | D24_UNORM_S8_UINT = MaxDepthFormat, | 118 | D24_UNORM_S8_UINT = MaxStencilFormat, |
| 115 | S8_UINT_D24_UNORM, | 119 | S8_UINT_D24_UNORM, |
| 116 | D32_FLOAT_S8_UINT, | 120 | D32_FLOAT_S8_UINT, |
| 117 | 121 | ||
| @@ -125,8 +129,9 @@ constexpr std::size_t MaxPixelFormat = static_cast<std::size_t>(PixelFormat::Max | |||
| 125 | enum class SurfaceType { | 129 | enum class SurfaceType { |
| 126 | ColorTexture = 0, | 130 | ColorTexture = 0, |
| 127 | Depth = 1, | 131 | Depth = 1, |
| 128 | DepthStencil = 2, | 132 | Stencil = 2, |
| 129 | Invalid = 3, | 133 | DepthStencil = 3, |
| 134 | Invalid = 4, | ||
| 130 | }; | 135 | }; |
| 131 | 136 | ||
| 132 | enum class SurfaceTarget { | 137 | enum class SurfaceTarget { |
| @@ -229,6 +234,7 @@ constexpr std::array<u32, MaxPixelFormat> BLOCK_WIDTH_TABLE = {{ | |||
| 229 | 1, // E5B9G9R9_FLOAT | 234 | 1, // E5B9G9R9_FLOAT |
| 230 | 1, // D32_FLOAT | 235 | 1, // D32_FLOAT |
| 231 | 1, // D16_UNORM | 236 | 1, // D16_UNORM |
| 237 | 1, // S8_UINT | ||
| 232 | 1, // D24_UNORM_S8_UINT | 238 | 1, // D24_UNORM_S8_UINT |
| 233 | 1, // S8_UINT_D24_UNORM | 239 | 1, // S8_UINT_D24_UNORM |
| 234 | 1, // D32_FLOAT_S8_UINT | 240 | 1, // D32_FLOAT_S8_UINT |
| @@ -328,6 +334,7 @@ constexpr std::array<u32, MaxPixelFormat> BLOCK_HEIGHT_TABLE = {{ | |||
| 328 | 1, // E5B9G9R9_FLOAT | 334 | 1, // E5B9G9R9_FLOAT |
| 329 | 1, // D32_FLOAT | 335 | 1, // D32_FLOAT |
| 330 | 1, // D16_UNORM | 336 | 1, // D16_UNORM |
| 337 | 1, // S8_UINT | ||
| 331 | 1, // D24_UNORM_S8_UINT | 338 | 1, // D24_UNORM_S8_UINT |
| 332 | 1, // S8_UINT_D24_UNORM | 339 | 1, // S8_UINT_D24_UNORM |
| 333 | 1, // D32_FLOAT_S8_UINT | 340 | 1, // D32_FLOAT_S8_UINT |
| @@ -427,6 +434,7 @@ constexpr std::array<u32, MaxPixelFormat> BITS_PER_BLOCK_TABLE = {{ | |||
| 427 | 32, // E5B9G9R9_FLOAT | 434 | 32, // E5B9G9R9_FLOAT |
| 428 | 32, // D32_FLOAT | 435 | 32, // D32_FLOAT |
| 429 | 16, // D16_UNORM | 436 | 16, // D16_UNORM |
| 437 | 8, // S8_UINT | ||
| 430 | 32, // D24_UNORM_S8_UINT | 438 | 32, // D24_UNORM_S8_UINT |
| 431 | 32, // S8_UINT_D24_UNORM | 439 | 32, // S8_UINT_D24_UNORM |
| 432 | 64, // D32_FLOAT_S8_UINT | 440 | 64, // D32_FLOAT_S8_UINT |
diff --git a/src/video_core/texture_cache/formatter.h b/src/video_core/texture_cache/formatter.h index c6cf0583f..b2c81057b 100644 --- a/src/video_core/texture_cache/formatter.h +++ b/src/video_core/texture_cache/formatter.h | |||
| @@ -194,6 +194,8 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str | |||
| 194 | return "D32_FLOAT"; | 194 | return "D32_FLOAT"; |
| 195 | case PixelFormat::D16_UNORM: | 195 | case PixelFormat::D16_UNORM: |
| 196 | return "D16_UNORM"; | 196 | return "D16_UNORM"; |
| 197 | case PixelFormat::S8_UINT: | ||
| 198 | return "S8_UINT"; | ||
| 197 | case PixelFormat::D24_UNORM_S8_UINT: | 199 | case PixelFormat::D24_UNORM_S8_UINT: |
| 198 | return "D24_UNORM_S8_UINT"; | 200 | return "D24_UNORM_S8_UINT"; |
| 199 | case PixelFormat::S8_UINT_D24_UNORM: | 201 | case PixelFormat::S8_UINT_D24_UNORM: |
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 95106f88f..70c52aaac 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -21,6 +21,13 @@ | |||
| 21 | namespace Vulkan { | 21 | namespace Vulkan { |
| 22 | namespace { | 22 | namespace { |
| 23 | namespace Alternatives { | 23 | namespace Alternatives { |
| 24 | constexpr std::array STENCIL8_UINT{ | ||
| 25 | VK_FORMAT_D16_UNORM_S8_UINT, | ||
| 26 | VK_FORMAT_D24_UNORM_S8_UINT, | ||
| 27 | VK_FORMAT_D32_SFLOAT_S8_UINT, | ||
| 28 | VK_FORMAT_UNDEFINED, | ||
| 29 | }; | ||
| 30 | |||
| 24 | constexpr std::array DEPTH24_UNORM_STENCIL8_UINT{ | 31 | constexpr std::array DEPTH24_UNORM_STENCIL8_UINT{ |
| 25 | VK_FORMAT_D32_SFLOAT_S8_UINT, | 32 | VK_FORMAT_D32_SFLOAT_S8_UINT, |
| 26 | VK_FORMAT_D16_UNORM_S8_UINT, | 33 | VK_FORMAT_D16_UNORM_S8_UINT, |
| @@ -74,6 +81,8 @@ void SetNext(void**& next, T& data) { | |||
| 74 | 81 | ||
| 75 | constexpr const VkFormat* GetFormatAlternatives(VkFormat format) { | 82 | constexpr const VkFormat* GetFormatAlternatives(VkFormat format) { |
| 76 | switch (format) { | 83 | switch (format) { |
| 84 | case VK_FORMAT_S8_UINT: | ||
| 85 | return Alternatives::STENCIL8_UINT.data(); | ||
| 77 | case VK_FORMAT_D24_UNORM_S8_UINT: | 86 | case VK_FORMAT_D24_UNORM_S8_UINT: |
| 78 | return Alternatives::DEPTH24_UNORM_STENCIL8_UINT.data(); | 87 | return Alternatives::DEPTH24_UNORM_STENCIL8_UINT.data(); |
| 79 | case VK_FORMAT_D16_UNORM_S8_UINT: | 88 | case VK_FORMAT_D16_UNORM_S8_UINT: |
| @@ -145,6 +154,7 @@ std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(vk::Physica | |||
| 145 | VK_FORMAT_R4G4B4A4_UNORM_PACK16, | 154 | VK_FORMAT_R4G4B4A4_UNORM_PACK16, |
| 146 | VK_FORMAT_D32_SFLOAT, | 155 | VK_FORMAT_D32_SFLOAT, |
| 147 | VK_FORMAT_D16_UNORM, | 156 | VK_FORMAT_D16_UNORM, |
| 157 | VK_FORMAT_S8_UINT, | ||
| 148 | VK_FORMAT_D16_UNORM_S8_UINT, | 158 | VK_FORMAT_D16_UNORM_S8_UINT, |
| 149 | VK_FORMAT_D24_UNORM_S8_UINT, | 159 | VK_FORMAT_D24_UNORM_S8_UINT, |
| 150 | VK_FORMAT_D32_SFLOAT_S8_UINT, | 160 | VK_FORMAT_D32_SFLOAT_S8_UINT, |