diff options
| author | 2019-12-13 02:37:23 -0300 | |
|---|---|---|
| committer | 2019-12-13 02:37:23 -0300 | |
| commit | f845df8651c5d09f514138c7360749fa34f22815 (patch) | |
| tree | 0dec043550b5cfe3d6a6780e8d45e1b2562d0f7a /src | |
| parent | Merge pull request #3217 from jhol/fix-boost-include (diff) | |
| download | yuzu-f845df8651c5d09f514138c7360749fa34f22815.tar.gz yuzu-f845df8651c5d09f514138c7360749fa34f22815.tar.xz yuzu-f845df8651c5d09f514138c7360749fa34f22815.zip | |
maxwell_to_vk: Use VK_EXT_index_type_uint8 when available
Diffstat (limited to 'src')
| -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) { | |||
| 308 | return {}; | 308 | return {}; |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | vk::IndexType IndexFormat(Maxwell::IndexFormat index_format) { | 311 | vk::IndexType IndexFormat(const VKDevice& device, Maxwell::IndexFormat index_format) { |
| 312 | switch (index_format) { | 312 | switch (index_format) { |
| 313 | case Maxwell::IndexFormat::UnsignedByte: | 313 | case Maxwell::IndexFormat::UnsignedByte: |
| 314 | UNIMPLEMENTED_MSG("Vulkan does not support native u8 index format"); | 314 | if (!device.IsExtIndexTypeUint8Supported()) { |
| 315 | return vk::IndexType::eUint16; | 315 | UNIMPLEMENTED_MSG("Native uint8 indices are not supported on this device"); |
| 316 | return vk::IndexType::eUint16; | ||
| 317 | } | ||
| 318 | return vk::IndexType::eUint8EXT; | ||
| 316 | case Maxwell::IndexFormat::UnsignedShort: | 319 | case Maxwell::IndexFormat::UnsignedShort: |
| 317 | return vk::IndexType::eUint16; | 320 | return vk::IndexType::eUint16; |
| 318 | case Maxwell::IndexFormat::UnsignedInt: | 321 | 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 | |||
| 40 | 40 | ||
| 41 | vk::CompareOp ComparisonOp(Maxwell::ComparisonOp comparison); | 41 | vk::CompareOp ComparisonOp(Maxwell::ComparisonOp comparison); |
| 42 | 42 | ||
| 43 | vk::IndexType IndexFormat(Maxwell::IndexFormat index_format); | 43 | vk::IndexType IndexFormat(const VKDevice& device, Maxwell::IndexFormat index_format); |
| 44 | 44 | ||
| 45 | vk::StencilOp StencilOp(Maxwell::StencilOp stencil_op); | 45 | vk::StencilOp StencilOp(Maxwell::StencilOp stencil_op); |
| 46 | 46 | ||