diff --git a/src/nbl/video/CVulkanPhysicalDevice.cpp b/src/nbl/video/CVulkanPhysicalDevice.cpp index 79ffc7306d..beed96045e 100644 --- a/src/nbl/video/CVulkanPhysicalDevice.cpp +++ b/src/nbl/video/CVulkanPhysicalDevice.cpp @@ -259,6 +259,9 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart return nullptr; if (!isExtensionSupported(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME)) return nullptr; + // At least one of these two must be available + if (!isExtensionSupported(VK_KHR_MAINTENANCE_5_EXTENSION_NAME) && !isExtensionSupported(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME)) + return nullptr; // Basic stuff for constructing pNext chains VkBaseInStructure* pNextTail; @@ -304,11 +307,11 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart //VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT graphicsPipelineLibraryProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT }; VkPhysicalDeviceFragmentDensityMap2PropertiesEXT fragmentDensityMap2Properties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT }; VkPhysicalDeviceRayTracingPipelinePropertiesKHR rayTracingPipelineProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR }; -#if 0 // TODO VkPhysicalDeviceCooperativeMatrixPropertiesKHR cooperativeMatrixProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR }; -#endif VkPhysicalDeviceShaderSMBuiltinsPropertiesNV shaderSMBuiltinsPropertiesNV = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV }; VkPhysicalDeviceShaderCoreProperties2AMD shaderCoreProperties2AMD = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD }; + VkPhysicalDeviceMaintenance5PropertiesKHR maintenance5Properties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR }; + VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT graphicsPipelineLibraryProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT }; //! Because Renderdoc is special and instead of ignoring extensions it whitelists them if (isExtensionSupported(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME)) addToPNextChain(&externalMemoryHostProperties); @@ -331,14 +334,14 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart addToPNextChain(&fragmentDensityMap2Properties); if (isExtensionSupported(VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME)) addToPNextChain(&rayTracingPipelineProperties); -#if 0 // TODO if (isExtensionSupported(VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) addToPNextChain(&cooperativeMatrixProperties); -#endif if (isExtensionSupported(VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME)) addToPNextChain(&shaderSMBuiltinsPropertiesNV); - if (isExtensionSupported(VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME)) - addToPNextChain(&shaderCoreProperties2AMD); + if (isExtensionSupported(VK_KHR_MAINTENANCE_5_EXTENSION_NAME)) + addToPNextChain(&maintenance5Properties); + if (isExtensionSupported(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME)) + addToPNextChain(&graphicsPipelineLibraryProperties); // call finalizePNextChain(); vkGetPhysicalDeviceProperties2(vk_physicalDevice,&deviceProperties2); @@ -394,31 +397,25 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart //vulkan12Properties.denormBehaviorIndependence; //vulkan12Properties.denormBehaviorIndependence; - if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat16) - return nullptr; - if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat32) - return nullptr; - properties.limits.shaderSignedZeroInfNanPreserveFloat64 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64; - properties.limits.shaderDenormPreserveFloat16 = vulkan12Properties.shaderDenormPreserveFloat16; + properties.limits.shaderSignedZeroInfNanPreserveFloat32 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat32; properties.limits.shaderDenormPreserveFloat32 = vulkan12Properties.shaderDenormPreserveFloat32; - properties.limits.shaderDenormPreserveFloat64 = vulkan12Properties.shaderDenormPreserveFloat64; - properties.limits.shaderDenormFlushToZeroFloat16 = vulkan12Properties.shaderDenormFlushToZeroFloat16; properties.limits.shaderDenormFlushToZeroFloat32 = vulkan12Properties.shaderDenormFlushToZeroFloat32; - properties.limits.shaderDenormFlushToZeroFloat64 = vulkan12Properties.shaderDenormFlushToZeroFloat64; - properties.limits.shaderRoundingModeRTEFloat16 = vulkan12Properties.shaderRoundingModeRTEFloat16; properties.limits.shaderRoundingModeRTEFloat32 = vulkan12Properties.shaderRoundingModeRTEFloat32; - properties.limits.shaderRoundingModeRTEFloat64 = vulkan12Properties.shaderRoundingModeRTEFloat64; - properties.limits.shaderRoundingModeRTZFloat16 = vulkan12Properties.shaderRoundingModeRTZFloat16; properties.limits.shaderRoundingModeRTZFloat32 = vulkan12Properties.shaderRoundingModeRTZFloat32; + properties.limits.shaderSignedZeroInfNanPreserveFloat16 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat16; + properties.limits.shaderDenormPreserveFloat16 = vulkan12Properties.shaderDenormPreserveFloat16; + properties.limits.shaderDenormFlushToZeroFloat16 = vulkan12Properties.shaderDenormFlushToZeroFloat16; + properties.limits.shaderRoundingModeRTEFloat16 = vulkan12Properties.shaderRoundingModeRTEFloat16; + properties.limits.shaderRoundingModeRTZFloat16 = vulkan12Properties.shaderRoundingModeRTZFloat16; + properties.limits.shaderSignedZeroInfNanPreserveFloat64 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64; + properties.limits.shaderDenormPreserveFloat64 = vulkan12Properties.shaderDenormPreserveFloat64; + properties.limits.shaderDenormFlushToZeroFloat64 = vulkan12Properties.shaderDenormFlushToZeroFloat64; + properties.limits.shaderRoundingModeRTEFloat64 = vulkan12Properties.shaderRoundingModeRTEFloat64; properties.limits.shaderRoundingModeRTZFloat64 = vulkan12Properties.shaderRoundingModeRTZFloat64; - + + // descriptor indexing properties.limits.maxUpdateAfterBindDescriptorsInAllPools = vulkan12Properties.maxUpdateAfterBindDescriptorsInAllPools; - properties.limits.shaderUniformBufferArrayNonUniformIndexingNative = vulkan12Properties.shaderUniformBufferArrayNonUniformIndexingNative; - properties.limits.shaderSampledImageArrayNonUniformIndexingNative = vulkan12Properties.shaderSampledImageArrayNonUniformIndexingNative; - properties.limits.shaderStorageBufferArrayNonUniformIndexingNative = vulkan12Properties.shaderStorageBufferArrayNonUniformIndexingNative; - properties.limits.shaderStorageImageArrayNonUniformIndexingNative = vulkan12Properties.shaderStorageImageArrayNonUniformIndexingNative; - properties.limits.shaderInputAttachmentArrayNonUniformIndexingNative = vulkan12Properties.shaderInputAttachmentArrayNonUniformIndexingNative; properties.limits.robustBufferAccessUpdateAfterBind = vulkan12Properties.robustBufferAccessUpdateAfterBind; properties.limits.quadDivergentImplicitLod = vulkan12Properties.quadDivergentImplicitLod; properties.limits.maxPerStageDescriptorUpdateAfterBindSamplers = vulkan12Properties.maxPerStageDescriptorUpdateAfterBindSamplers; @@ -439,8 +436,9 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart properties.limits.supportedDepthResolveModes = static_cast(vulkan12Properties.supportedDepthResolveModes); properties.limits.supportedStencilResolveModes = static_cast(vulkan12Properties.supportedStencilResolveModes); - properties.limits.independentResolveNone = vulkan12Properties.independentResolveNone; - properties.limits.independentResolve = vulkan12Properties.independentResolve; + + if (!vulkan12Properties.independentResolve || !vulkan12Properties.independentResolveNone) + return nullptr; // not dealing with vulkan12Properties.filterMinmaxSingleComponentFormats, TODO report in usage properties.limits.filterMinmaxImageComponentMapping = vulkan12Properties.filterMinmaxImageComponentMapping; @@ -458,7 +456,7 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart properties.limits.maxComputeWorkgroupSubgroups = vulkan13Properties.maxComputeWorkgroupSubgroups; properties.limits.requiredSubgroupSizeStages = static_cast(vulkan13Properties.requiredSubgroupSizeStages&VK_SHADER_STAGE_ALL); - // don't real with inline uniform blocks yet + // don't deal with inline uniform blocks yet properties.limits.integerDotProduct8BitUnsignedAccelerated = vulkan13Properties.integerDotProduct8BitUnsignedAccelerated; properties.limits.integerDotProduct8BitSignedAccelerated = vulkan13Properties.integerDotProduct8BitSignedAccelerated; @@ -608,10 +606,9 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart properties.limits.shaderGroupHandleAlignment = rayTracingPipelineProperties.shaderGroupHandleAlignment; properties.limits.maxRayHitAttributeSize = rayTracingPipelineProperties.maxRayHitAttributeSize; } -#if 0 //TODO + if (isExtensionSupported(VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) properties.limits.cooperativeMatrixSupportedStages = static_cast(cooperativeMatrixProperties.cooperativeMatrixSupportedStages); -#endif //! Nabla @@ -707,9 +704,10 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM rasterizationOrderAttachmentAccessFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM }; VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR rayTracingPositionFetchFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR }; VkPhysicalDeviceColorWriteEnableFeaturesEXT colorWriteEnableFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT }; -#if 0 - VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR }; -#endif + VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR }; + VkPhysicalDeviceMaintenance5FeaturesKHR maintenance5Features = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR }; + VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT graphicsPipelineLibraryFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT }; + if (isExtensionSupported(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME)) addToPNextChain(&conditionalRenderingFeatures); if (isExtensionSupported(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME)) @@ -773,6 +771,10 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart addToPNextChain(&rayTracingPositionFetchFeatures); if (isExtensionSupported(VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME)) addToPNextChain(&colorWriteEnableFeatures); + if (isExtensionSupported(VK_KHR_MAINTENANCE_5_EXTENSION_NAME)) + addToPNextChain(&maintenance5Features); + if (isExtensionSupported(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME)) + addToPNextChain(&graphicsPipelineLibraryFeatures); // call finalizePNextChain(); vkGetPhysicalDeviceFeatures2(vk_physicalDevice,&deviceFeatures); @@ -895,6 +897,43 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart properties.limits.shaderFloat16 = vulkan12Features.shaderFloat16; if (!vulkan12Features.shaderInt8) return nullptr; + + if (!properties.limits.shaderSignedZeroInfNanPreserveFloat32) + return nullptr; + if (!properties.limits.shaderDenormPreserveFloat32) + return nullptr; + if (!properties.limits.shaderDenormFlushToZeroFloat32) + return nullptr; + if (!properties.limits.shaderRoundingModeRTEFloat32) + return nullptr; + if (!properties.limits.shaderRoundingModeRTZFloat32) + return nullptr; + + if (vulkan12Features.shaderFloat16) { + if (!properties.limits.shaderSignedZeroInfNanPreserveFloat16) + return nullptr; + if (!properties.limits.shaderDenormPreserveFloat16) + return nullptr; + if (!properties.limits.shaderDenormFlushToZeroFloat16) + return nullptr; + if (!properties.limits.shaderRoundingModeRTEFloat16) + return nullptr; + if (!properties.limits.shaderRoundingModeRTZFloat16) + return nullptr; + } + + if (deviceFeatures.features.shaderFloat64) { + if (!properties.limits.shaderSignedZeroInfNanPreserveFloat64) + return nullptr; + if (!properties.limits.shaderDenormPreserveFloat64) + return nullptr; + if (!properties.limits.shaderDenormFlushToZeroFloat64) + return nullptr; + if (!properties.limits.shaderRoundingModeRTEFloat64) + return nullptr; + if (!properties.limits.shaderRoundingModeRTZFloat64) + return nullptr; + } if (!vulkan12Features.descriptorIndexing) return nullptr; @@ -903,11 +942,9 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart if (!vulkan12Features.shaderUniformTexelBufferArrayDynamicIndexing || !vulkan12Features.shaderStorageTexelBufferArrayDynamicIndexing) return nullptr; // not uniform at all - properties.limits.shaderUniformBufferArrayNonUniformIndexing = vulkan12Features.shaderUniformBufferArrayNonUniformIndexing; - if (!vulkan12Features.shaderSampledImageArrayNonUniformIndexing || !vulkan12Features.shaderStorageBufferArrayNonUniformIndexing || !vulkan12Features.shaderStorageImageArrayNonUniformIndexing) + if (!vulkan12Features.shaderUniformBufferArrayNonUniformIndexing || !vulkan12Features.shaderSampledImageArrayNonUniformIndexing || !vulkan12Features.shaderStorageBufferArrayNonUniformIndexing || !vulkan12Features.shaderStorageImageArrayNonUniformIndexing) return nullptr; - properties.limits.shaderInputAttachmentArrayNonUniformIndexing = vulkan12Features.shaderInputAttachmentArrayNonUniformIndexing; - if (!vulkan12Features.shaderUniformTexelBufferArrayNonUniformIndexing || !vulkan12Features.shaderStorageTexelBufferArrayNonUniformIndexing) + if (!vulkan12Features.shaderInputAttachmentArrayNonUniformIndexing || !vulkan12Features.shaderUniformTexelBufferArrayNonUniformIndexing || !vulkan12Features.shaderStorageTexelBufferArrayNonUniformIndexing) return nullptr; // update after bind properties.limits.descriptorBindingUniformBufferUpdateAfterBind = vulkan12Features.descriptorBindingUniformBufferUpdateAfterBind; @@ -1128,11 +1165,9 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart features.rasterizationOrderDepthAttachmentAccess = rasterizationOrderAttachmentAccessFeatures.rasterizationOrderDepthAttachmentAccess; features.rasterizationOrderStencilAttachmentAccess = rasterizationOrderAttachmentAccessFeatures.rasterizationOrderStencilAttachmentAccess; } -#if 0 + if (isExtensionSupported(VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) features.cooperativeMatrixRobustBufferAccess = cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess; -#endif - /* Vulkan Extensions Features as Limits */ if (isExtensionSupported(VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME)) @@ -1204,10 +1239,9 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart if (isExtensionSupported(VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME)) properties.limits.colorWriteEnable = colorWriteEnableFeatures.colorWriteEnable; -#if 0 //TODO + if (isExtensionSupported(VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) - properties.limits.cooperativeMatrixRobustness = cooperativeMatrixFeatures.robustness; -#endif + properties.limits.cooperativeMatrix = cooperativeMatrixFeatures.cooperativeMatrix; } // we compare all limits against the defaults easily! @@ -1577,10 +1611,19 @@ core::smart_refctd_ptr CVulkanPhysicalDevice::createLogicalDevic VkPhysicalDeviceColorWriteEnableFeaturesEXT colorWriteEnableFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT,nullptr }; enableExtensionIfAvailable(VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME,&colorWriteEnableFeatures); -#if 0 + VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR,nullptr }; REQUIRE_EXTENSION_IF(enabledFeatures.cooperativeMatrixRobustBufferAccess,VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME,&cooperativeMatrixFeatures); -#endif + + VkPhysicalDeviceMaintenance5FeaturesKHR maintenance5Features = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR, nullptr }; + VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT graphicsPipelineLibraryFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT, nullptr }; + + // Enable maintenance5 and graphics pipeline libraries as backup if available + if (!enableExtensionIfAvailable(VK_KHR_MAINTENANCE_5_EXTENSION_NAME, &maintenance5Features)) + { + enableExtensionIfAvailable(VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME, nullptr); + enableExtensionIfAvailable(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME, &graphicsPipelineLibraryFeatures); + } #undef REQUIRE_EXTENSION_IF @@ -1677,11 +1720,11 @@ core::smart_refctd_ptr CVulkanPhysicalDevice::createLogicalDevic vulkan12Features.shaderInputAttachmentArrayDynamicIndexing = limits.shaderInputAttachmentArrayDynamicIndexing; vulkan12Features.shaderUniformTexelBufferArrayDynamicIndexing = true; // implied by `descriptorIndexing` vulkan12Features.shaderStorageTexelBufferArrayDynamicIndexing = true; // implied by `descriptorIndexing` - vulkan12Features.shaderUniformBufferArrayNonUniformIndexing = limits.shaderUniformBufferArrayNonUniformIndexing; + vulkan12Features.shaderUniformBufferArrayNonUniformIndexing = true; // implied by `descriptorIndexing` vulkan12Features.shaderSampledImageArrayNonUniformIndexing = true; // implied by `descriptorIndexing` vulkan12Features.shaderStorageBufferArrayNonUniformIndexing = true; // implied by `descriptorIndexing` vulkan12Features.shaderStorageImageArrayNonUniformIndexing = true; // require - vulkan12Features.shaderInputAttachmentArrayNonUniformIndexing = limits.shaderInputAttachmentArrayNonUniformIndexing; + vulkan12Features.shaderInputAttachmentArrayNonUniformIndexing = true; // implied by `descriptorIndexing` vulkan12Features.shaderUniformTexelBufferArrayNonUniformIndexing = true; // implied by `descriptorIndexing` vulkan12Features.shaderStorageTexelBufferArrayNonUniformIndexing = true; // ubiquitous vulkan12Features.descriptorBindingUniformBufferUpdateAfterBind = limits.descriptorBindingUniformBufferUpdateAfterBind; @@ -1823,10 +1866,13 @@ core::smart_refctd_ptr CVulkanPhysicalDevice::createLogicalDevic rasterizationOrderAttachmentAccessFeatures.rasterizationOrderStencilAttachmentAccess = enabledFeatures.rasterizationOrderStencilAttachmentAccess; //colorWriteEnableFeatures [LIMIT SO ENABLE EVERYTHING BY DEFAULT] -#if 0 - cooperativeMatrixFeatures.cooperativeMatrix = true; - cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess = enabledFeatures.cooperativeMatrixRobustBufferAccess; -#endif + + if (limits.cooperativeMatrix) { + cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess = enabledFeatures.cooperativeMatrixRobustBufferAccess; + } + + maintenance5Features.maintenance5 = true; + graphicsPipelineLibraryFeatures.graphicsPipelineLibrary = maintenance5Features.maintenance5 == 0; // convert a set into a vector core::vector extensionStrings(extensionsToEnable.size()); diff --git a/src/nbl/video/ILogicalDevice.cpp b/src/nbl/video/ILogicalDevice.cpp index 8c6a7752a6..3511238a92 100644 --- a/src/nbl/video/ILogicalDevice.cpp +++ b/src/nbl/video/ILogicalDevice.cpp @@ -673,8 +673,6 @@ core::smart_refctd_ptr ILogicalDevice::createRenderpass(const IG const auto mixedAttachmentSamples = getEnabledFeatures().mixedAttachmentSamples; const auto supportedDepthResolveModes = getPhysicalDeviceLimits().supportedDepthResolveModes; const auto supportedStencilResolveModes = getPhysicalDeviceLimits().supportedStencilResolveModes; - const auto independentResolve = getPhysicalDeviceLimits().independentResolve; - const auto independentResolveNone = getPhysicalDeviceLimits().independentResolveNone; const auto maxColorAttachments = getPhysicalDeviceLimits().maxColorAttachments; const int32_t maxMultiviewViewCount = getPhysicalDeviceLimits().maxMultiviewViewCount; for (auto i=0u; i ILogicalDevice::createRenderpass(const IG return nullptr; } - if (hasDepth && hasStencil) - { - if (!independentResolve && depthResolve!=stencilResolve) - { - if (independentResolveNone) - { - // https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03186 - // https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSubpassDescriptionDepthStencilResolve-pNext-06877 - if (depthResolve != resolve_flag_t::NONE && stencilResolve != resolve_flag_t::NONE) - { - NBL_LOG_ERROR("Invalid stencil attachment's resolve mode (subpasses[%u])", i); - return nullptr; - } - } - // https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03185 - // https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSubpassDescriptionDepthStencilResolve-pNext-06876 - else - { - NBL_LOG_ERROR("Invalid stencil attachment's resolve mode (subpasses[%u])", i); - return nullptr; - } - } - } - // https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSubpassDescriptionDepthStencilResolve-pNext-06873 if (/*multisampledToSingleSampledUsed*/false && depthResolve == resolve_flag_t::NONE && stencilResolve == resolve_flag_t::NONE) { diff --git a/src/nbl/video/device_capabilities/device_features.json b/src/nbl/video/device_capabilities/device_features.json index 3c09088a2b..cd68831495 100644 --- a/src/nbl/video/device_capabilities/device_features.json +++ b/src/nbl/video/device_capabilities/device_features.json @@ -13,7 +13,7 @@ }, { "comment": [ - "Roadmap 2022 requires support for these, device support is ubiquitous and enablement is unlikely to harm performance" + "Roadmap 2024 requires support for these, device support is ubiquitous and enablement is unlikely to harm performance" ], "entries": [ { @@ -58,7 +58,7 @@ "name": "sampleRateShading", "value": true, "expose": "REQUIRE", - "comment": ["ROADMAP 2022 and good device support"] + "comment": ["ROADMAP 2024 and good device support"] }, { "type": "bool", @@ -79,7 +79,7 @@ }, { "comment": [ - "Roadmap 2022 requires support for these, device support is ubiquitous and enablement is unlikely to harm performance" + "Roadmap 2024 requires support for these, device support is ubiquitous and enablement is unlikely to harm performance" ], "entries": [ { @@ -156,7 +156,7 @@ "name": "samplerAnisotropy", "value": true, "expose": "REQUIRE", - "comment": ["Roadmap 2022 requires support for these, device support is ubiquitous"] + "comment": ["Roadmap 2024 requires support for these, device support is ubiquitous"] }, { "comment": [ @@ -188,7 +188,7 @@ "name": "occlusionQueryPrecise", "value": true, "expose": "REQUIRE", - "comment": ["ROADMAP 2022 and good device support"] + "comment": ["ROADMAP 2024 and good device support"] }, { "type": "bool", @@ -215,7 +215,7 @@ "value": false, "expose": "MOVE_TO_LIMIT", "comment": [ - "ROADMAP 2022 no supporton iOS GPUs" + "ROADMAP 2024" ] }, { @@ -272,7 +272,7 @@ }, { "comment": [ - "ROADMAP 2022 and good device support" + "ROADMAP 2024 and good device support" ], "entries": [ { @@ -301,8 +301,8 @@ "value": false, "expose": "MOVE_TO_LIMIT", "comment": [ - "[EXPOSE AS A LIMIT] ROADMAP 2022 but Apple GPUs have poor support", - "ROADMAP 2022 but no iOS GPU supports" + "[EXPOSE AS A LIMIT] ROADMAP 2024 but Apple GPUs have poor support", + "ROADMAP 2024 but no iOS GPU supports" ] }, { @@ -547,7 +547,7 @@ "value": false, "expose": "DISABLE", "comment": [ - "[DO NOT EXPOSE] ROADMAP 2022 Enables certain formats in Vulkan", + "[DO NOT EXPOSE] ROADMAP 2024 Enables certain formats in Vulkan", "we just enable them if available or else we need to make format support query functions in LogicalDevice as well" ] }, @@ -571,7 +571,7 @@ "value": true, "expose": "REQUIRE", "comment": [ - "ROADMAP 2022 and device support ubiquitous", + "ROADMAP 2024 and device support ubiquitous", "ALIAS: VK_KHR_sampler_mirror_clamp_to_edge" ] }, @@ -597,7 +597,7 @@ "name": "storageBuffer8BitAccess", "value": true, "expose": "REQUIRE", - "comment": ["ROADMAP 2022 and device support ubiquitous"] + "comment": ["ROADMAP 2024 and device support ubiquitous"] }, { "type": "bool", @@ -670,7 +670,7 @@ "name": "descriptorIndexing", "value": true, "expose": "REQUIRE", - "comment": ["ROADMAP 2022"] + "comment": ["ROADMAP 2024"] }, { "type": "bool", @@ -698,9 +698,9 @@ { "type": "bool", "name": "shaderUniformBufferArrayNonUniformIndexing", - "value": false, - "expose": "MOVE_TO_LIMIT", - "comment": ["[EXPOSE AS A LIMIT] ROADMAP 2022 mandates but poor device support"] + "value": true, + "expose": "REQUIRE", + "comment": ["[EXPOSE AS A LIMIT] ROADMAP 2024 mandates but poor device support"] }, { "type": "bool", @@ -720,13 +720,13 @@ "name": "shaderStorageImageArrayNonUniformIndexing", "value": true, "expose": "REQUIRE", - "comment": ["ROADMAP 2022"] + "comment": ["ROADMAP 2024"] }, { "type": "bool", "name": "shaderInputAttachmentArrayNonUniformIndexing", - "value": false, - "expose": "MOVE_TO_LIMIT", + "value": true, + "expose": "REQUIRE", "comment": ["[EXPOSE AS A LIMIT] This is for a SPIR-V capability, the overhead should only be incurred if the pipeline uses this capability"] }, { @@ -741,7 +741,7 @@ "name": "shaderStorageTexelBufferArrayNonUniformIndexing", "value": true, "expose": "REQUIRE", - "comment": ["ROADMAP 2022 and good device support"] + "comment": ["ROADMAP 2024 and good device support"] }, { "type": "bool", @@ -801,7 +801,7 @@ "name": "descriptorBindingVariableDescriptorCount", "value": true, "expose": "REQUIRE", - "comment": ["ROADMAP 2022 and good device support"] + "comment": ["ROADMAP 2024 and good device support"] }, { "type": "bool", @@ -829,7 +829,7 @@ "value": true, "expose": "REQUIRE", "comment": [ - "Roadmap 2022 requires support for these we always enable and they're unlikely to harm performance", + "Roadmap 2024 requires support for these we always enable and they're unlikely to harm performance", "or VK_EXT_scalar_block_layout" ] }, @@ -914,7 +914,7 @@ }, { "comment": [ - "ROADMAP2022 wants them. ALIAS VK_KHR_vulkan_memory_model" + "ROADMAP2024 wants them. ALIAS VK_KHR_vulkan_memory_model" ], "entries": [ { @@ -937,7 +937,7 @@ "value": false, "expose": "MOVE_TO_LIMIT", "comment": [ - "[EXPOSE AS A LIMIT] ROADMAP2022 wants them, but device support low", + "[EXPOSE AS A LIMIT] ROADMAP2024 wants them, but device support low", "Vulkan 1.3 requires but we make concessions for MoltenVK" ] }, @@ -1008,7 +1008,7 @@ "name": "descriptorBindingInlineUniformBlockUpdateAfterBind", "value": false, "expose": "DISABLE", - "comment": ["ROADMAP 2022, Nabla Core Profile:"] + "comment": ["ROADMAP 2024, Nabla Core Profile:"] } ] }, @@ -1980,7 +1980,7 @@ }, { "comment": [ - "[DEPRECATED] Required wholly by ROADMAP 2022 and Nabla Core Profile", + "[DEPRECATED] Required wholly by ROADMAP 2024 and Nabla Core Profile", "InlineUniformBlockFeaturesEXT", "VK_EXT_inline_uniform_block" ] @@ -2152,7 +2152,7 @@ }, { "comment": [ - "[DEPRECATED] Vulkan 1.1 Core and ROADMAP 2022", + "[DEPRECATED] Vulkan 1.1 Core and ROADMAP 2024", "SamplerYcbcrConversionFeaturesKHR", "VK_KHR_sampler_ycbcr_conversion" ] @@ -3202,7 +3202,6 @@ "value": null, "expose": "DISABLE", "comment": [ - "[TODO] this one isn't in the headers yet", "GraphicsPipelineLibraryFeaturesEXT", "VK_EXT_graphics_pipeline_library" ] @@ -4138,13 +4137,21 @@ ] }, { - "type": "bool", - "name": "cooperativeMatrixRobustBufferAccess", - "value": false, "comment": [ - "[EXPOSE AS LIMIT] redundant", - "bool cooperativeMatrix = limits.cooperativeMatrixSupportedStages.any();", - "leaving as a feature because of overhead" + "VK_KHR_cooperative_matrix" + ], + "entries": [ + { + "type": "bool", + "name": "cooperativeMatrix", + "value": false, + "expose": "MOVE_TO_LIMIT" + }, + { + "type": "bool", + "name": "cooperativeMatrixRobustBufferAccess", + "value": false + } ] }, { diff --git a/src/nbl/video/device_capabilities/device_limits.json b/src/nbl/video/device_capabilities/device_limits.json index 7ff920e121..9aad66d944 100644 --- a/src/nbl/video/device_capabilities/device_limits.json +++ b/src/nbl/video/device_capabilities/device_limits.json @@ -116,7 +116,7 @@ { "type": "uint32_t", "name": "maxSamplerAllocationCount", - "value": 4000 + "value": "(1u << 10u)" }, { "type": "uint32_t", @@ -195,7 +195,7 @@ { "type": "uint32_t", "name": "maxDescriptorSetUBOs", - "value": 90 + "value": 155 }, { "type": "uint32_t", @@ -360,7 +360,7 @@ { "type": "uint32_t", "name": "maxFragmentCombinedOutputResources", - "value": 16 + "value": 127 } ] }, @@ -414,7 +414,7 @@ "name": "maxDrawIndexedIndexValue", "value": null, "expose": "DISABLE", - "comment": ["[DO NOT EXPOSE] ROADMAP2022: requires fullDrawIndexUint33 so this must be 1xffFFffFFu"] + "comment": ["[DO NOT EXPOSE] ROADMAP2024: requires fullDrawIndexUint33 so this must be 1xffFFffFFu"] }, { "type": "uint32_t", @@ -690,7 +690,7 @@ { "type": "float", "name": "pointSizeRange[2]", - "value": "{1.f,64.f}" + "value": "{1.f,255.875f}" }, { "type": "float", @@ -706,7 +706,7 @@ { "type": "float", "name": "lineWidthGranularity", - "value": "1.f", + "value": "0.125f", "compare": "REVERSE" } ] @@ -721,7 +721,7 @@ "type": "bool", "name": "standardSampleLocations", "value": false, - "comment": ["Had to roll back from requiring, ROADMAP 2022 but some of our targets missing"] + "comment": ["Had to roll back from requiring, ROADMAP 2024 but some of our targets missing"] }, { "comment": [], @@ -729,7 +729,7 @@ { "type": "uint16_t", "name": "optimalBufferCopyOffsetAlignment", - "value": 256, + "value": 128, "compare": "REVERSE" }, { @@ -741,7 +741,7 @@ { "type": "uint16_t", "name": "nonCoherentAtomSize", - "value": 256, + "value": 128, "compare": "REVERSE" } ] @@ -814,7 +814,7 @@ "type": "bool", "name": "shaderSubgroupClustered", "value": "false", - "comment": ["ROADMAP2022 mandates all but clustered and quad-all-stages, however all GPU's that we care about support basic, vote, ballot, shuffle and relative so not listing!"] + "comment": ["ROADMAP2024 mandates all but clustered and quad-all-stages, however all GPU's that we care about support basic, vote, ballot, shuffle and relative so not listing!"] }, { "type": "bool", @@ -867,12 +867,12 @@ { "type": "uint32_t", "name": "maxPerSetDescriptors", - "value": "572" + "value": "1024" }, { "type": "uint64_t", "name": "maxMemoryAllocationSize", - "value": "MinMaxSSBOSize" + "value": "MinMaxSSBOSize*2" } ] } @@ -903,81 +903,77 @@ { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat16", - "value": true, - "expose": "DISABLE" + "value": true }, { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat32", - "value": true, - "expose": "DISABLE" + "value": true }, { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat64", - "value": false + "value": true }, { "type": "bool", "name": "shaderDenormPreserveFloat16", - "value": false + "value": true }, { "type": "bool", "name": "shaderDenormPreserveFloat32", - "value": false + "value": true }, { "type": "bool", "name": "shaderDenormPreserveFloat64", - "value": false + "value": true }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat16", - "value": false + "value": true }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat32", - "value": false + "value": true }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat64", - "value": false + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTEFloat16", - "value": false, - "comment": ["ROADMAP2024 but no good support yet"] + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTEFloat32", - "value": false, - "comment": ["ROADMAP2024 but no good support yet"] + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTEFloat64", - "value": false + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTZFloat16", - "value": false + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTZFloat32", - "value": false + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTZFloat64", - "value": false + "value": true } ] }, @@ -992,29 +988,34 @@ { "type": "bool", "name": "shaderUniformBufferArrayNonUniformIndexingNative", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderSampledImageArrayNonUniformIndexingNative", - "value": false, + "value": true, + "expose": "REQUIRE", "comment": ["promotion candidate"] }, { "type": "bool", "name": "shaderStorageBufferArrayNonUniformIndexingNative", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderStorageImageArrayNonUniformIndexingNative", - "value": false, + "value": true, + "expose": "REQUIRE", "comment": ["promotion candidate"] }, { "type": "bool", "name": "shaderInputAttachmentArrayNonUniformIndexingNative", - "value": false, + "value": true, + "expose": "REQUIRE", "comment": ["promotion candidate"] }, { @@ -1030,7 +1031,7 @@ { "type": "uint32_t", "name": "maxPerStageDescriptorUpdateAfterBindSamplers", - "value": 500000 + "value": "1 << 10" }, { "type": "uint32_t", @@ -1040,17 +1041,17 @@ { "type": "uint32_t", "name": "maxPerStageDescriptorUpdateAfterBindSSBOs", - "value": 500000 + "value": 1000000 }, { "type": "uint32_t", "name": "maxPerStageDescriptorUpdateAfterBindImages", - "value": 500000 + "value": 1000000 }, { "type": "uint32_t", "name": "maxPerStageDescriptorUpdateAfterBindStorageImages", - "value": 500000 + "value": 1000000 }, { "type": "uint32_t", @@ -1060,17 +1061,17 @@ { "type": "uint32_t", "name": "maxPerStageUpdateAfterBindResources", - "value": 500000 + "value": 1000000 }, { "type": "uint32_t", "name": "maxDescriptorSetUpdateAfterBindSamplers", - "value": 500000 + "value": 1000000 }, { "type": "uint32_t", "name": "maxDescriptorSetUpdateAfterBindUBOs", - "value": 72 + "value": 180 }, { "type": "uint32_t", @@ -1080,22 +1081,22 @@ { "type": "uint32_t", "name": "maxDescriptorSetUpdateAfterBindSSBOs", - "value": 500000 + "value": 1000000 }, { "type": "uint32_t", "name": "maxDescriptorSetUpdateAfterBindDynamicOffsetSSBOs", - "value": 4 + "value": 8 }, { "type": "uint32_t", "name": "maxDescriptorSetUpdateAfterBindImages", - "value": 500000 + "value": 1000000 }, { "type": "uint32_t", "name": "maxDescriptorSetUpdateAfterBindStorageImages", - "value": 500000 + "value": 1000000 }, { "type": "uint32_t", @@ -1110,7 +1111,7 @@ { "type": "core::bitflag", "name": "supportedDepthResolveModes", - "value": "RESOLVE_MODE_FLAGS::SAMPLE_ZERO_BIT" + "value": "core::bitflag(RESOLVE_MODE_FLAGS::SAMPLE_ZERO_BIT) | RESOLVE_MODE_FLAGS::MIN_BIT | RESOLVE_MODE_FLAGS::MAX_BIT" }, { "type": "core::bitflag", @@ -1120,12 +1121,14 @@ { "type": "bool", "name": "independentResolveNone", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "independentResolve", - "value": false + "value": true, + "expose": "REQUIRE" } ] }, @@ -1176,7 +1179,7 @@ { "type": "uint8_t", "name": "minSubgroupSize", - "value": "64", + "value": "32", "compare": "REVERSE" }, { @@ -2171,7 +2174,7 @@ ] }, { - "type": "core::bitflag", + "type": "core::bitflag", "name": "cooperativeMatrixSupportedStages", "value": "asset::IShader::E_SHADER_STAGE::ESS_UNKNOWN", "comment": [