diff options
author | bunnei <bunneidev@gmail.com> | 2021-11-19 10:16:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 10:16:49 +0100 |
commit | c45af76ea0f19a76a7fa99e37d296aa2fabf0395 (patch) | |
tree | ffb440bd7ee2f624164cc7f1f912db7a81ca06c5 /src/video_core/vulkan_common/vulkan_device.cpp | |
parent | Merge pull request #7349 from ameerj/ogl-convert-image (diff) | |
parent | renderer_vulkan: Implement S8_UINT stencil format (diff) | |
download | yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.gz yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.bz2 yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.lz yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.xz yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.tar.zst yuzu-c45af76ea0f19a76a7fa99e37d296aa2fabf0395.zip |
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.cpp')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ namespace Vulkan { namespace { namespace Alternatives { +constexpr std::array STENCIL8_UINT{ + VK_FORMAT_D16_UNORM_S8_UINT, + VK_FORMAT_D24_UNORM_S8_UINT, + VK_FORMAT_D32_SFLOAT_S8_UINT, + VK_FORMAT_UNDEFINED, +}; + constexpr std::array DEPTH24_UNORM_STENCIL8_UINT{ VK_FORMAT_D32_SFLOAT_S8_UINT, VK_FORMAT_D16_UNORM_S8_UINT, @@ -74,6 +81,8 @@ void SetNext(void**& next, T& data) { constexpr const VkFormat* GetFormatAlternatives(VkFormat format) { switch (format) { + case VK_FORMAT_S8_UINT: + return Alternatives::STENCIL8_UINT.data(); case VK_FORMAT_D24_UNORM_S8_UINT: return Alternatives::DEPTH24_UNORM_STENCIL8_UINT.data(); case VK_FORMAT_D16_UNORM_S8_UINT: @@ -145,6 +154,7 @@ std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(vk::Physica VK_FORMAT_R4G4B4A4_UNORM_PACK16, VK_FORMAT_D32_SFLOAT, VK_FORMAT_D16_UNORM, + VK_FORMAT_S8_UINT, VK_FORMAT_D16_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT, |