summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2019-12-13 02:37:23 -0300
committerGravatar ReinUsesLisp2019-12-13 02:37:23 -0300
commitf845df8651c5d09f514138c7360749fa34f22815 (patch)
tree0dec043550b5cfe3d6a6780e8d45e1b2562d0f7a /src
parentMerge pull request #3217 from jhol/fix-boost-include (diff)
downloadyuzu-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.cpp9
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.h2
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
311vk::IndexType IndexFormat(Maxwell::IndexFormat index_format) { 311vk::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
41vk::CompareOp ComparisonOp(Maxwell::ComparisonOp comparison); 41vk::CompareOp ComparisonOp(Maxwell::ComparisonOp comparison);
42 42
43vk::IndexType IndexFormat(Maxwell::IndexFormat index_format); 43vk::IndexType IndexFormat(const VKDevice& device, Maxwell::IndexFormat index_format);
44 44
45vk::StencilOp StencilOp(Maxwell::StencilOp stencil_op); 45vk::StencilOp StencilOp(Maxwell::StencilOp stencil_op);
46 46