@@ -399,25 +399,51 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
399
399
400
400
// vulkan12Properties.denormBehaviorIndependence;
401
401
// vulkan12Properties.denormBehaviorIndependence;
402
- properties.limits .shaderSignedZeroInfNanPreserveFloat32 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat32 ;
403
- properties.limits .shaderDenormPreserveFloat32 = vulkan12Properties.shaderDenormPreserveFloat32 ;
404
- properties.limits .shaderDenormFlushToZeroFloat32 = vulkan12Properties.shaderDenormFlushToZeroFloat32 ;
405
- properties.limits .shaderRoundingModeRTEFloat32 = vulkan12Properties.shaderRoundingModeRTEFloat32 ;
406
- properties.limits .shaderRoundingModeRTZFloat32 = vulkan12Properties.shaderRoundingModeRTZFloat32 ;
407
- properties.limits .shaderSignedZeroInfNanPreserveFloat16 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat16 ;
408
- properties.limits .shaderDenormPreserveFloat16 = vulkan12Properties.shaderDenormPreserveFloat16 ;
409
- properties.limits .shaderDenormFlushToZeroFloat16 = vulkan12Properties.shaderDenormFlushToZeroFloat16 ;
410
- properties.limits .shaderRoundingModeRTEFloat16 = vulkan12Properties.shaderRoundingModeRTEFloat16 ;
411
- properties.limits .shaderRoundingModeRTZFloat16 = vulkan12Properties.shaderRoundingModeRTZFloat16 ;
412
- properties.limits .shaderSignedZeroInfNanPreserveFloat64 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64 ;
413
- properties.limits .shaderDenormPreserveFloat64 = vulkan12Properties.shaderDenormPreserveFloat64 ;
414
- properties.limits .shaderDenormFlushToZeroFloat64 = vulkan12Properties.shaderDenormFlushToZeroFloat64 ;
415
- properties.limits .shaderRoundingModeRTEFloat64 = vulkan12Properties.shaderRoundingModeRTEFloat64 ;
416
- properties.limits .shaderRoundingModeRTZFloat64 = vulkan12Properties.shaderRoundingModeRTZFloat64 ;
417
402
403
+ if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat32 )
404
+ return nullptr ;
405
+ if (!vulkan12Properties.shaderDenormPreserveFloat32 )
406
+ return nullptr ;
407
+ if (!vulkan12Properties.shaderDenormFlushToZeroFloat32 )
408
+ return nullptr ;
409
+ if (!vulkan12Properties.shaderRoundingModeRTEFloat32 )
410
+ return nullptr ;
411
+ if (!vulkan12Properties.shaderRoundingModeRTZFloat32 )
412
+ return nullptr ;
413
+
414
+ if (properties.limits .shaderFloat16 ) {
415
+ if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat16 )
416
+ return nullptr ;
417
+ if (!vulkan12Properties.shaderDenormPreserveFloat16 )
418
+ return nullptr ;
419
+ if (!vulkan12Properties.shaderDenormFlushToZeroFloat16 )
420
+ return nullptr ;
421
+ if (!vulkan12Properties.shaderRoundingModeRTEFloat16 )
422
+ return nullptr ;
423
+ if (!vulkan12Properties.shaderRoundingModeRTZFloat16 )
424
+ return nullptr ;
425
+ }
426
+
427
+ if (properties.limits .shaderFloat64 ) {
428
+ if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64 )
429
+ return nullptr ;
430
+ if (!vulkan12Properties.shaderDenormPreserveFloat64 )
431
+ return nullptr ;
432
+ if (!vulkan12Properties.shaderDenormFlushToZeroFloat64 )
433
+ return nullptr ;
434
+ if (!vulkan12Properties.shaderRoundingModeRTEFloat64 )
435
+ return nullptr ;
436
+ if (!vulkan12Properties.shaderRoundingModeRTZFloat64 )
437
+ return nullptr ;
438
+ }
418
439
419
440
// descriptor indexing
420
441
properties.limits .maxUpdateAfterBindDescriptorsInAllPools = vulkan12Properties.maxUpdateAfterBindDescriptorsInAllPools ;
442
+ properties.limits .shaderUniformBufferArrayNonUniformIndexingNative = vulkan12Properties.shaderUniformBufferArrayNonUniformIndexingNative ;
443
+ properties.limits .shaderSampledImageArrayNonUniformIndexingNative = vulkan12Properties.shaderSampledImageArrayNonUniformIndexingNative ;
444
+ properties.limits .shaderStorageBufferArrayNonUniformIndexingNative = vulkan12Properties.shaderStorageBufferArrayNonUniformIndexingNative ;
445
+ properties.limits .shaderStorageImageArrayNonUniformIndexingNative = vulkan12Properties.shaderStorageImageArrayNonUniformIndexingNative ;
446
+ properties.limits .shaderInputAttachmentArrayNonUniformIndexingNative = vulkan12Properties.shaderInputAttachmentArrayNonUniformIndexingNative ;
421
447
properties.limits .robustBufferAccessUpdateAfterBind = vulkan12Properties.robustBufferAccessUpdateAfterBind ;
422
448
properties.limits .quadDivergentImplicitLod = vulkan12Properties.quadDivergentImplicitLod ;
423
449
properties.limits .maxPerStageDescriptorUpdateAfterBindSamplers = vulkan12Properties.maxPerStageDescriptorUpdateAfterBindSamplers ;
@@ -899,43 +925,6 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
899
925
properties.limits .shaderFloat16 = vulkan12Features.shaderFloat16 ;
900
926
if (!vulkan12Features.shaderInt8 )
901
927
return nullptr ;
902
-
903
- if (!properties.limits .shaderSignedZeroInfNanPreserveFloat32 )
904
- return nullptr ;
905
- if (!properties.limits .shaderDenormPreserveFloat32 )
906
- return nullptr ;
907
- if (!properties.limits .shaderDenormFlushToZeroFloat32 )
908
- return nullptr ;
909
- if (!properties.limits .shaderRoundingModeRTEFloat32 )
910
- return nullptr ;
911
- if (!properties.limits .shaderRoundingModeRTZFloat32 )
912
- return nullptr ;
913
-
914
- if (vulkan12Features.shaderFloat16 ) {
915
- if (!properties.limits .shaderSignedZeroInfNanPreserveFloat16 )
916
- return nullptr ;
917
- if (!properties.limits .shaderDenormPreserveFloat16 )
918
- return nullptr ;
919
- if (!properties.limits .shaderDenormFlushToZeroFloat16 )
920
- return nullptr ;
921
- if (!properties.limits .shaderRoundingModeRTEFloat16 )
922
- return nullptr ;
923
- if (!properties.limits .shaderRoundingModeRTZFloat16 )
924
- return nullptr ;
925
- }
926
-
927
- if (deviceFeatures.features .shaderFloat64 ) {
928
- if (!properties.limits .shaderSignedZeroInfNanPreserveFloat64 )
929
- return nullptr ;
930
- if (!properties.limits .shaderDenormPreserveFloat64 )
931
- return nullptr ;
932
- if (!properties.limits .shaderDenormFlushToZeroFloat64 )
933
- return nullptr ;
934
- if (!properties.limits .shaderRoundingModeRTEFloat64 )
935
- return nullptr ;
936
- if (!properties.limits .shaderRoundingModeRTZFloat64 )
937
- return nullptr ;
938
- }
939
928
940
929
if (!vulkan12Features.descriptorIndexing )
941
930
return nullptr ;
@@ -1620,10 +1609,16 @@ core::smart_refctd_ptr<ILogicalDevice> CVulkanPhysicalDevice::createLogicalDevic
1620
1609
VkPhysicalDeviceMaintenance5FeaturesKHR maintenance5Features = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR, nullptr };
1621
1610
VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT graphicsPipelineLibraryFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT, nullptr };
1622
1611
1612
+ enableExtensionIfAvailable (VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME, nullptr );
1613
+
1623
1614
// Enable maintenance5 and graphics pipeline libraries as backup if available
1624
- if (! enableExtensionIfAvailable (VK_KHR_MAINTENANCE_5_EXTENSION_NAME, &maintenance5Features))
1615
+ if (enableExtensionIfAvailable (VK_KHR_MAINTENANCE_5_EXTENSION_NAME, &maintenance5Features))
1625
1616
{
1626
- enableExtensionIfAvailable (VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME, nullptr );
1617
+ maintenance5Features.maintenance5 = true ;
1618
+ }
1619
+ else
1620
+ {
1621
+ graphicsPipelineLibraryFeatures.graphicsPipelineLibrary = true ;
1627
1622
enableExtensionIfAvailable (VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME, &graphicsPipelineLibraryFeatures);
1628
1623
}
1629
1624
@@ -1873,9 +1868,6 @@ core::smart_refctd_ptr<ILogicalDevice> CVulkanPhysicalDevice::createLogicalDevic
1873
1868
cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess = enabledFeatures.cooperativeMatrixRobustBufferAccess ;
1874
1869
}
1875
1870
1876
- maintenance5Features.maintenance5 = true ;
1877
- graphicsPipelineLibraryFeatures.graphicsPipelineLibrary = maintenance5Features.maintenance5 == 0 ;
1878
-
1879
1871
// convert a set into a vector
1880
1872
core::vector<const char *> extensionStrings (extensionsToEnable.size ());
1881
1873
{
0 commit comments