mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 11:32:54 +00:00
maxwell_to_vk: Use VK_EXT_index_type_uint8 when available
This commit is contained in:
parent
8fc49a83b6
commit
f845df8651
|
@ -308,11 +308,14 @@ vk::CompareOp ComparisonOp(Maxwell::ComparisonOp comparison) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
vk::IndexType IndexFormat(Maxwell::IndexFormat index_format) {
|
vk::IndexType IndexFormat(const VKDevice& device, Maxwell::IndexFormat index_format) {
|
||||||
switch (index_format) {
|
switch (index_format) {
|
||||||
case Maxwell::IndexFormat::UnsignedByte:
|
case Maxwell::IndexFormat::UnsignedByte:
|
||||||
UNIMPLEMENTED_MSG("Vulkan does not support native u8 index format");
|
if (!device.IsExtIndexTypeUint8Supported()) {
|
||||||
return vk::IndexType::eUint16;
|
UNIMPLEMENTED_MSG("Native uint8 indices are not supported on this device");
|
||||||
|
return vk::IndexType::eUint16;
|
||||||
|
}
|
||||||
|
return vk::IndexType::eUint8EXT;
|
||||||
case Maxwell::IndexFormat::UnsignedShort:
|
case Maxwell::IndexFormat::UnsignedShort:
|
||||||
return vk::IndexType::eUint16;
|
return vk::IndexType::eUint16;
|
||||||
case Maxwell::IndexFormat::UnsignedInt:
|
case Maxwell::IndexFormat::UnsignedInt:
|
||||||
|
|
|
@ -40,7 +40,7 @@ vk::Format VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttr
|
||||||
|
|
||||||
vk::CompareOp ComparisonOp(Maxwell::ComparisonOp comparison);
|
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);
|
vk::StencilOp StencilOp(Maxwell::StencilOp stencil_op);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue