From 3b97980de0fae66b1633e65757fc6f5774d7b0b0 Mon Sep 17 00:00:00 2001 From: Chip Davis Date: Wed, 12 Sep 2018 14:36:46 -0500 Subject: [PATCH] VkPhysicalDevice: Advertise the fullDrawIndexUint32 feature. This just means the maximum index for an indexed draw is 2**32 - 1. --- MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm index d43ac927..7883061a 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm @@ -478,6 +478,7 @@ void MVKPhysicalDevice::initFeatures() { memset(&_features, 0, sizeof(_features)); // Start with everything cleared _features.robustBufferAccess = true; // XXX Required by Vulkan spec + _features.fullDrawIndexUint32 = true; _features.independentBlend = true; _features.depthBiasClamp = true; _features.fillModeNonSolid = true; @@ -522,7 +523,7 @@ void MVKPhysicalDevice::initFeatures() { //typedef struct VkPhysicalDeviceFeatures { // VkBool32 robustBufferAccess; // done -// VkBool32 fullDrawIndexUint32; +// VkBool32 fullDrawIndexUint32; // done // VkBool32 imageCubeArray; // done // VkBool32 independentBlend; // done // VkBool32 geometryShader; @@ -732,7 +733,7 @@ void MVKPhysicalDevice::initProperties() { _properties.limits.maxComputeWorkGroupCount[1] = kMVKUndefinedLargeUInt32; _properties.limits.maxComputeWorkGroupCount[2] = kMVKUndefinedLargeUInt32; - _properties.limits.maxDrawIndexedIndexValue = numeric_limits::max() - 1; + _properties.limits.maxDrawIndexedIndexValue = numeric_limits::max(); _properties.limits.maxDrawIndirectCount = kMVKUndefinedLargeUInt32; _properties.limits.minTexelOffset = -8;