@@ -304,9 +304,7 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
304
304
// VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT graphicsPipelineLibraryProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT };
305
305
VkPhysicalDeviceFragmentDensityMap2PropertiesEXT fragmentDensityMap2Properties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT };
306
306
VkPhysicalDeviceRayTracingPipelinePropertiesKHR rayTracingPipelineProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR };
307
- #if 0 // TODO
308
307
VkPhysicalDeviceCooperativeMatrixPropertiesKHR cooperativeMatrixProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR };
309
- #endif
310
308
VkPhysicalDeviceShaderSMBuiltinsPropertiesNV shaderSMBuiltinsPropertiesNV = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV };
311
309
VkPhysicalDeviceShaderCoreProperties2AMD shaderCoreProperties2AMD = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD };
312
310
// ! Because Renderdoc is special and instead of ignoring extensions it whitelists them
@@ -331,10 +329,8 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
331
329
addToPNextChain (&fragmentDensityMap2Properties);
332
330
if (isExtensionSupported (VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME))
333
331
addToPNextChain (&rayTracingPipelineProperties);
334
- #if 0 // TODO
335
332
if (isExtensionSupported (VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME))
336
333
addToPNextChain (&cooperativeMatrixProperties);
337
- #endif
338
334
if (isExtensionSupported (VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME))
339
335
addToPNextChain (&shaderSMBuiltinsPropertiesNV);
340
336
if (isExtensionSupported (VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME))
@@ -398,19 +394,32 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
398
394
return nullptr ;
399
395
if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat32 )
400
396
return nullptr ;
401
- properties.limits .shaderSignedZeroInfNanPreserveFloat64 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64 ;
402
- properties.limits .shaderDenormPreserveFloat16 = vulkan12Properties.shaderDenormPreserveFloat16 ;
403
- properties.limits .shaderDenormPreserveFloat32 = vulkan12Properties.shaderDenormPreserveFloat32 ;
404
- properties.limits .shaderDenormPreserveFloat64 = vulkan12Properties.shaderDenormPreserveFloat64 ;
405
- properties.limits .shaderDenormFlushToZeroFloat16 = vulkan12Properties.shaderDenormFlushToZeroFloat16 ;
406
- properties.limits .shaderDenormFlushToZeroFloat32 = vulkan12Properties.shaderDenormFlushToZeroFloat32 ;
407
- properties.limits .shaderDenormFlushToZeroFloat64 = vulkan12Properties.shaderDenormFlushToZeroFloat64 ;
408
- properties.limits .shaderRoundingModeRTEFloat16 = vulkan12Properties.shaderRoundingModeRTEFloat16 ;
409
- properties.limits .shaderRoundingModeRTEFloat32 = vulkan12Properties.shaderRoundingModeRTEFloat32 ;
410
- properties.limits .shaderRoundingModeRTEFloat64 = vulkan12Properties.shaderRoundingModeRTEFloat64 ;
411
- properties.limits .shaderRoundingModeRTZFloat16 = vulkan12Properties.shaderRoundingModeRTZFloat16 ;
412
- properties.limits .shaderRoundingModeRTZFloat32 = vulkan12Properties.shaderRoundingModeRTZFloat32 ;
413
- properties.limits .shaderRoundingModeRTZFloat64 = vulkan12Properties.shaderRoundingModeRTZFloat64 ;
397
+ if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64 )
398
+ return nullptr ;
399
+ if (!vulkan12Properties.shaderDenormPreserveFloat16 )
400
+ return nullptr ;
401
+ if (!vulkan12Properties.shaderDenormPreserveFloat32 )
402
+ return nullptr ;
403
+ if (!vulkan12Properties.shaderDenormPreserveFloat64 )
404
+ return nullptr ;
405
+ if (!vulkan12Properties.shaderDenormFlushToZeroFloat16 )
406
+ return nullptr ;
407
+ if (!vulkan12Properties.shaderDenormFlushToZeroFloat32 )
408
+ return nullptr ;
409
+ if (!vulkan12Properties.shaderDenormFlushToZeroFloat64 )
410
+ return nullptr ;
411
+ if (!vulkan12Properties.shaderRoundingModeRTEFloat16 )
412
+ return nullptr ;
413
+ if (!vulkan12Properties.shaderRoundingModeRTEFloat32 )
414
+ return nullptr ;
415
+ if (!vulkan12Properties.shaderRoundingModeRTEFloat64 )
416
+ return nullptr ;
417
+ if (!vulkan12Properties.shaderRoundingModeRTZFloat16 )
418
+ return nullptr ;
419
+ if (!vulkan12Properties.shaderRoundingModeRTZFloat32 )
420
+ return nullptr ;
421
+ if (!vulkan12Properties.shaderRoundingModeRTZFloat64 )
422
+ return nullptr ;
414
423
415
424
// descriptor indexing
416
425
properties.limits .maxUpdateAfterBindDescriptorsInAllPools = vulkan12Properties.maxUpdateAfterBindDescriptorsInAllPools ;
@@ -439,8 +448,9 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
439
448
440
449
properties.limits .supportedDepthResolveModes = static_cast <SPhysicalDeviceLimits::RESOLVE_MODE_FLAGS>(vulkan12Properties.supportedDepthResolveModes );
441
450
properties.limits .supportedStencilResolveModes = static_cast <SPhysicalDeviceLimits::RESOLVE_MODE_FLAGS>(vulkan12Properties.supportedStencilResolveModes );
442
- properties.limits .independentResolveNone = vulkan12Properties.independentResolveNone ;
443
- properties.limits .independentResolve = vulkan12Properties.independentResolve ;
451
+
452
+ if (!vulkan12Properties.independentResolve || !vulkan12Properties.independentResolveNone )
453
+ return nullptr ;
444
454
445
455
// not dealing with vulkan12Properties.filterMinmaxSingleComponentFormats, TODO report in usage
446
456
properties.limits .filterMinmaxImageComponentMapping = vulkan12Properties.filterMinmaxImageComponentMapping ;
@@ -608,10 +618,9 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
608
618
properties.limits .shaderGroupHandleAlignment = rayTracingPipelineProperties.shaderGroupHandleAlignment ;
609
619
properties.limits .maxRayHitAttributeSize = rayTracingPipelineProperties.maxRayHitAttributeSize ;
610
620
}
611
- # if 0 //TODO
621
+
612
622
if (isExtensionSupported (VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME))
613
623
properties.limits .cooperativeMatrixSupportedStages = static_cast <asset::IShader::E_SHADER_STAGE>(cooperativeMatrixProperties.cooperativeMatrixSupportedStages );
614
- #endif
615
624
616
625
617
626
// ! Nabla
@@ -707,9 +716,8 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
707
716
VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM rasterizationOrderAttachmentAccessFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM };
708
717
VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR rayTracingPositionFetchFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR };
709
718
VkPhysicalDeviceColorWriteEnableFeaturesEXT colorWriteEnableFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT };
710
- #if 0
711
719
VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR };
712
- # endif
720
+
713
721
if (isExtensionSupported (VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME))
714
722
addToPNextChain (&conditionalRenderingFeatures);
715
723
if (isExtensionSupported (VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME))
@@ -1126,10 +1134,9 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
1126
1134
features.rasterizationOrderDepthAttachmentAccess = rasterizationOrderAttachmentAccessFeatures.rasterizationOrderDepthAttachmentAccess ;
1127
1135
features.rasterizationOrderStencilAttachmentAccess = rasterizationOrderAttachmentAccessFeatures.rasterizationOrderStencilAttachmentAccess ;
1128
1136
}
1129
- # if 0
1137
+
1130
1138
if (isExtensionSupported (VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME))
1131
1139
features.cooperativeMatrixRobustBufferAccess = cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess ;
1132
- #endif
1133
1140
1134
1141
1135
1142
/* Vulkan Extensions Features as Limits */
@@ -1202,10 +1209,9 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
1202
1209
1203
1210
if (isExtensionSupported (VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME))
1204
1211
properties.limits .colorWriteEnable = colorWriteEnableFeatures.colorWriteEnable ;
1205
- # if 0 //TODO
1212
+
1206
1213
if (isExtensionSupported (VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME))
1207
- properties.limits.cooperativeMatrixRobustness = cooperativeMatrixFeatures.robustness;
1208
- #endif
1214
+ properties.limits .cooperativeMatrixRobustBufferAccess = cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess ;
1209
1215
}
1210
1216
1211
1217
// we compare all limits against the defaults easily!
@@ -1575,10 +1581,9 @@ core::smart_refctd_ptr<ILogicalDevice> CVulkanPhysicalDevice::createLogicalDevic
1575
1581
1576
1582
VkPhysicalDeviceColorWriteEnableFeaturesEXT colorWriteEnableFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT,nullptr };
1577
1583
enableExtensionIfAvailable (VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME,&colorWriteEnableFeatures);
1578
- # if 0
1584
+
1579
1585
VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR,nullptr };
1580
1586
REQUIRE_EXTENSION_IF (enabledFeatures.cooperativeMatrixRobustBufferAccess ,VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME,&cooperativeMatrixFeatures);
1581
- #endif
1582
1587
1583
1588
#undef REQUIRE_EXTENSION_IF
1584
1589
@@ -1821,10 +1826,11 @@ core::smart_refctd_ptr<ILogicalDevice> CVulkanPhysicalDevice::createLogicalDevic
1821
1826
rasterizationOrderAttachmentAccessFeatures.rasterizationOrderStencilAttachmentAccess = enabledFeatures.rasterizationOrderStencilAttachmentAccess ;
1822
1827
1823
1828
// colorWriteEnableFeatures [LIMIT SO ENABLE EVERYTHING BY DEFAULT]
1824
- #if 0
1825
- cooperativeMatrixFeatures.cooperativeMatrix = true;
1826
- cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess = enabledFeatures.cooperativeMatrixRobustBufferAccess;
1827
- #endif
1829
+
1830
+ if (limits.cooperativeMatrix ) {
1831
+ cooperativeMatrixFeatures.cooperativeMatrix = enabledFeatures.cooperativeMatrix ;
1832
+ cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess = enabledFeatures.cooperativeMatrixRobustBufferAccess ;
1833
+ }
1828
1834
1829
1835
// convert a set into a vector
1830
1836
core::vector<const char *> extensionStrings (extensionsToEnable.size ());
0 commit comments