From 544645de05873b2e52ee6a3241fe12517164f193 Mon Sep 17 00:00:00 2001 From: Chip Davis Date: Thu, 20 Sep 2018 13:34:03 -0500 Subject: [PATCH] Advertise the shader{Uniform,Storage}BufferArrayDynamicIndexing features. This means that arrays in the `Uniform` storage class decorated with `Block` or `BufferBlock` (or in the `StorageBuffer` class with `Block`) can be indexed with dynamically uniform constants. I see nothing in the MSL spec which forbids this. --- MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm index f5c038dd..951cbcd3 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm @@ -487,6 +487,8 @@ void MVKPhysicalDevice::initFeatures() { _features.shaderStorageImageMultisample = true; _features.shaderStorageImageReadWithoutFormat = true; _features.shaderStorageImageWriteWithoutFormat = true; + _features.shaderUniformBufferArrayDynamicIndexing = true; + _features.shaderStorageBufferArrayDynamicIndexing = true; _features.shaderClipDistance = true; _features.shaderInt16 = true; _features.multiDrawIndirect = true; @@ -566,9 +568,9 @@ void MVKPhysicalDevice::initFeatures() { // VkBool32 shaderStorageImageMultisample; // done // VkBool32 shaderStorageImageReadWithoutFormat; // done // VkBool32 shaderStorageImageWriteWithoutFormat; // done -// VkBool32 shaderUniformBufferArrayDynamicIndexing; +// VkBool32 shaderUniformBufferArrayDynamicIndexing; // done // VkBool32 shaderSampledImageArrayDynamicIndexing; -// VkBool32 shaderStorageBufferArrayDynamicIndexing; +// VkBool32 shaderStorageBufferArrayDynamicIndexing; // done // VkBool32 shaderStorageImageArrayDynamicIndexing; // VkBool32 shaderClipDistance; // done // VkBool32 shaderCullDistance;