Merge pull request #2119 from spnda/KHR_shader_integer_dot_product

Add: KHR_shader_integer_dot_product
This commit is contained in:
Bill Hollings 2024-01-16 18:13:22 -05:00 committed by GitHub
commit 133a49cdf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 43 additions and 1 deletions

View File

@ -349,6 +349,7 @@ In addition to core *Vulkan* functionality, **MoltenVK** also supports the foll
- `VK_KHR_shader_draw_parameters`
- `VK_KHR_shader_float_controls`
- `VK_KHR_shader_float16_int8`
- `VK_KHR_shader_integer_dot_product`
- `VK_KHR_shader_non_semantic_info`
- `VK_KHR_shader_subgroup_extended_types`
- *Requires Metal 2.1 on Mac or Metal 2.2 and Apple family 4 on iOS.*

View File

@ -1 +1 @@
117161dd546075a568f0526bccffcd7e0bc96897
64f64c837a8ba7e32e91cebcc6c796e9b45ab186

View File

@ -375,6 +375,11 @@ void MVKPhysicalDevice::getFeatures(VkPhysicalDeviceFeatures2* features) {
portabilityFeatures->vertexAttributeAccessBeyondStride = true; // Costs additional buffers. Should make configuration switch.
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: {
auto* shaderIntDotFeatures = (VkPhysicalDeviceShaderIntegerDotProductFeatures*)next;
shaderIntDotFeatures->shaderIntegerDotProduct = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: {
auto* formatFeatures = (VkPhysicalDevice4444FormatsFeaturesEXT*)next;
bool canSupport4444 = _metalFeatures.tileBasedDeferredRendering &&
@ -751,6 +756,40 @@ void MVKPhysicalDevice::getProperties(VkPhysicalDeviceProperties2* properties) {
auto* barycentricProperties = (VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR*)next;
barycentricProperties->triStripVertexOrderIndependentOfProvokingVertex = false;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES: {
auto* shaderIntDotProperties = (VkPhysicalDeviceShaderIntegerDotProductProperties*)next;
shaderIntDotProperties->integerDotProduct8BitUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProduct8BitSignedAccelerated = false;
shaderIntDotProperties->integerDotProduct8BitMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProduct4x8BitPackedUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProduct4x8BitPackedSignedAccelerated = false;
shaderIntDotProperties->integerDotProduct4x8BitPackedMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProduct16BitUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProduct16BitSignedAccelerated = false;
shaderIntDotProperties->integerDotProduct16BitMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProduct32BitUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProduct32BitSignedAccelerated = false;
shaderIntDotProperties->integerDotProduct32BitMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProduct64BitUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProduct64BitSignedAccelerated = false;
shaderIntDotProperties->integerDotProduct64BitMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating8BitSignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating16BitSignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating32BitSignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating64BitSignedAccelerated = false;
shaderIntDotProperties->integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = false;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR: {
auto* pushDescProps = (VkPhysicalDevicePushDescriptorPropertiesKHR*)next;

View File

@ -53,6 +53,7 @@ MVK_DEVICE_FEATURE(SeparateDepthStencilLayouts, SEPARATE_DEPTH_STENCIL_LAY
MVK_DEVICE_FEATURE(ShaderDrawParameters, SHADER_DRAW_PARAMETERS, 1)
MVK_DEVICE_FEATURE(ShaderAtomicInt64, SHADER_ATOMIC_INT64, 2)
MVK_DEVICE_FEATURE(ShaderFloat16Int8, SHADER_FLOAT16_INT8, 2)
MVK_DEVICE_FEATURE(ShaderIntegerDotProduct, SHADER_INTEGER_DOT_PRODUCT, 1)
MVK_DEVICE_FEATURE(ShaderSubgroupExtendedTypes, SHADER_SUBGROUP_EXTENDED_TYPES, 1)
MVK_DEVICE_FEATURE(SubgroupSizeControl, SUBGROUP_SIZE_CONTROL, 2)
MVK_DEVICE_FEATURE(Synchronization2, SYNCHRONIZATION_2, 1)

View File

@ -86,6 +86,7 @@ MVK_EXTENSION(KHR_shader_atomic_int64, KHR_SHADER_ATOMIC_INT64,
MVK_EXTENSION(KHR_shader_draw_parameters, KHR_SHADER_DRAW_PARAMETERS, DEVICE, 10.11, 8.0, 1.0)
MVK_EXTENSION(KHR_shader_float_controls, KHR_SHADER_FLOAT_CONTROLS, DEVICE, 10.11, 8.0, 1.0)
MVK_EXTENSION(KHR_shader_float16_int8, KHR_SHADER_FLOAT16_INT8, DEVICE, 10.11, 8.0, 1.0)
MVK_EXTENSION(KHR_shader_integer_dot_product, KHR_SHADER_INTEGER_DOT_PRODUCT, DEVICE, 10.11, 8.0, 1.0)
MVK_EXTENSION(KHR_shader_non_semantic_info, KHR_SHADER_NON_SEMANTIC_INFO, DEVICE, 10.11, 8.0, 1.0)
MVK_EXTENSION(KHR_shader_subgroup_extended_types, KHR_SHADER_SUBGROUP_EXTENDED_TYPES, DEVICE, 10.14, 13.0, 1.0)
MVK_EXTENSION(KHR_spirv_1_4, KHR_SPIRV_1_4, DEVICE, 10.11, 8.0, 1.0)