diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-13 06:37:23 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-13 06:37:23 +0100 |
commit | f845df8651c5d09f514138c7360749fa34f22815 (patch) | |
tree | 0dec043550b5cfe3d6a6780e8d45e1b2562d0f7a /src/video_core | |
parent | Merge pull request #3217 from jhol/fix-boost-include (diff) | |
download | yuzu-f845df8651c5d09f514138c7360749fa34f22815.tar yuzu-f845df8651c5d09f514138c7360749fa34f22815.tar.gz yuzu-f845df8651c5d09f514138c7360749fa34f22815.tar.bz2 yuzu-f845df8651c5d09f514138c7360749fa34f22815.tar.lz yuzu-f845df8651c5d09f514138c7360749fa34f22815.tar.xz yuzu-f845df8651c5d09f514138c7360749fa34f22815.tar.zst yuzu-f845df8651c5d09f514138c7360749fa34f22815.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 9 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 7f0eb6b74..5263dd768 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp @@ -308,11 +308,14 @@ vk::CompareOp ComparisonOp(Maxwell::ComparisonOp comparison) { return {}; } -vk::IndexType IndexFormat(Maxwell::IndexFormat index_format) { +vk::IndexType IndexFormat(const VKDevice& device, Maxwell::IndexFormat index_format) { switch (index_format) { case Maxwell::IndexFormat::UnsignedByte: - UNIMPLEMENTED_MSG("Vulkan does not support native u8 index format"); - return vk::IndexType::eUint16; + if (!device.IsExtIndexTypeUint8Supported()) { + UNIMPLEMENTED_MSG("Native uint8 indices are not supported on this device"); + return vk::IndexType::eUint16; + } + return vk::IndexType::eUint8EXT; case Maxwell::IndexFormat::UnsignedShort: return vk::IndexType::eUint16; case Maxwell::IndexFormat::UnsignedInt: diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.h b/src/video_core/renderer_vulkan/maxwell_to_vk.h index 904a32e01..7dafdacf8 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.h +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.h @@ -40,7 +40,7 @@ vk::Format VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttr vk::CompareOp ComparisonOp(Maxwell::ComparisonOp comparison); -vk::IndexType IndexFormat(Maxwell::IndexFormat index_format); +vk::IndexType IndexFormat(const VKDevice& device, Maxwell::IndexFormat index_format); vk::StencilOp StencilOp(Maxwell::StencilOp stencil_op); |