From 9eec70c799e149a0d9f1983591cb68e5397bd348 Mon Sep 17 00:00:00 2001 From: Ali Cheraghi Date: Mon, 3 Feb 2025 22:12:25 +0330 Subject: [PATCH 1/4] video: adjust device_limits/features to the updated profiles Signed-off-by: Ali Cheraghi --- src/nbl/video/CVulkanPhysicalDevice.cpp | 30 +-- .../device_capabilities/device_features.json | 76 +++---- .../device_capabilities/device_limits.json | 208 +++++++++--------- 3 files changed, 150 insertions(+), 164 deletions(-) diff --git a/src/nbl/video/CVulkanPhysicalDevice.cpp b/src/nbl/video/CVulkanPhysicalDevice.cpp index 79ffc7306d..b4a5c50945 100644 --- a/src/nbl/video/CVulkanPhysicalDevice.cpp +++ b/src/nbl/video/CVulkanPhysicalDevice.cpp @@ -304,9 +304,7 @@ 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 }; //! Because Renderdoc is special and instead of ignoring extensions it whitelists them @@ -331,10 +329,8 @@ 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)) @@ -458,7 +454,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,11 +604,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 if (isExtensionSupported(VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME)) @@ -707,9 +701,7 @@ 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 if (isExtensionSupported(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME)) addToPNextChain(&conditionalRenderingFeatures); if (isExtensionSupported(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME)) @@ -980,8 +972,8 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart properties.limits.shaderZeroInitializeWorkgroupMemory = vulkan13Features.shaderZeroInitializeWorkgroupMemory; - // not checking dynamicRendering - + if (!vulkan13Features.dynamicRendering) + return nullptr; if (!vulkan13Features.shaderIntegerDotProduct) return nullptr; if (!vulkan13Features.maintenance4) @@ -1128,11 +1120,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)) @@ -1577,10 +1567,9 @@ 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 #undef REQUIRE_EXTENSION_IF @@ -1677,11 +1666,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 +1812,9 @@ 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 // convert a set into a vector core::vector extensionStrings(extensionsToEnable.size()); diff --git a/src/nbl/video/device_capabilities/device_features.json b/src/nbl/video/device_capabilities/device_features.json index 3c09088a2b..fa1473fcea 100644 --- a/src/nbl/video/device_capabilities/device_features.json +++ b/src/nbl/video/device_capabilities/device_features.json @@ -8,12 +8,12 @@ { "type": "bool", "name": "robustBufferAccess", - "value": false, + "value": true, "comment": ["widely supported but has performance overhead, so remains an optional feature to enable"] }, { "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": [ { @@ -49,7 +49,7 @@ { "type": "bool", "name": "tessellationShader", - "value": false + "value": true } ] }, @@ -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", @@ -203,7 +203,7 @@ { "type": "bool", "name": "vertexPipelineStoresAndAtomics", - "value": false, + "value": true, "expose": "MOVE_TO_LIMIT", "comment": [ "All iOS GPUs don't support" @@ -212,16 +212,16 @@ { "type": "bool", "name": "fragmentStoresAndAtomics", - "value": false, + "value": true, "expose": "MOVE_TO_LIMIT", "comment": [ - "ROADMAP 2022 no supporton iOS GPUs" + "ROADMAP 2024 no supporton iOS GPUs" ] }, { "type": "bool", "name": "shaderTessellationAndGeometryPointSize", - "value": false, + "value": true, "expose": "MOVE_TO_LIMIT", "comment": [ "Candidate for promotion, just need to look into Linux and Android" @@ -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" ] }, { @@ -544,10 +544,10 @@ { "type": "bool", "name": "samplerYcbcrConversion", - "value": false, + "value": true, "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,14 +571,14 @@ "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" ] }, { "type": "bool", "name": "drawIndirectCount", - "value": false, + "value": true, "expose": "MOVE_TO_LIMIT", "comment": [ "[EXPOSE AS A LIMIT] ROADMAP 2022 requires support but MoltenVK doesn't support", @@ -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, + "value": true, "expose": "MOVE_TO_LIMIT", - "comment": ["[EXPOSE AS A LIMIT] ROADMAP 2022 mandates but poor device support"] + "comment": ["[EXPOSE AS A LIMIT] ROADMAP 2024 mandates but poor device support"] }, { "type": "bool", @@ -720,12 +720,12 @@ "name": "shaderStorageImageArrayNonUniformIndexing", "value": true, "expose": "REQUIRE", - "comment": ["ROADMAP 2022"] + "comment": ["ROADMAP 2024"] }, { "type": "bool", "name": "shaderInputAttachmentArrayNonUniformIndexing", - "value": false, + "value": true, "expose": "MOVE_TO_LIMIT", "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,14 +829,14 @@ "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" ] }, { "type": "bool", "name": "imagelessFramebuffer", - "value": false, + "value": true, "expose": "DISABLE", "comment": [ "[DO NOT EXPOSE] Decided against exposing, API is braindead, for details see: https://github.com/Devsh-Graphics-Programming/Nabla/issues/378", @@ -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" ] }, @@ -950,14 +950,14 @@ { "type": "bool", "name": "shaderOutputViewportIndex", - "value": false, + "value": true, "expose": "MOVE_TO_LIMIT", "comment": ["ALIAS: VK_EXT_shader_viewport_index_layer"] }, { "type": "bool", "name": "shaderOutputLayer", - "value": false, + "value": true, "expose": "MOVE_TO_LIMIT", "comment": ["ALIAS: VK_EXT_shader_viewport_index_layer"] } @@ -980,7 +980,7 @@ { "type": "bool", "name": "robustImageAccess", - "value": false, + "value": true, "comment": [ "This feature adds stricter requirements for how out of bounds reads from images are handled.", "Rather than returning undefined values,", @@ -999,7 +999,7 @@ { "type": "bool", "name": "inlineUniformBlock", - "value": false, + "value": true, "expose": "DISABLE", "comment": ["Vulkan 1.3, Nabla Core Profile:"] }, @@ -1008,7 +1008,7 @@ "name": "descriptorBindingInlineUniformBlockUpdateAfterBind", "value": false, "expose": "DISABLE", - "comment": ["ROADMAP 2022, Nabla Core Profile:"] + "comment": ["ROADMAP 2024, Nabla Core Profile:"] } ] }, @@ -1106,7 +1106,7 @@ { "type": "bool", "name": "dynamicRendering", - "value": false, + "value": true, "expose": "DISABLE", "comment": [ "[DO NOT EXPOSE] EVIL", @@ -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" ] diff --git a/src/nbl/video/device_capabilities/device_limits.json b/src/nbl/video/device_capabilities/device_limits.json index 7ff920e121..9744a6610b 100644 --- a/src/nbl/video/device_capabilities/device_limits.json +++ b/src/nbl/video/device_capabilities/device_limits.json @@ -91,7 +91,7 @@ { "type": "uint32_t", "name": "maxBufferViewTexels", - "value": "1u << 25" + "value": "1u << 26" }, { "type": "uint32_t", @@ -116,12 +116,12 @@ { "type": "uint32_t", "name": "maxSamplerAllocationCount", - "value": 4000 + "value": "(1u << 10u)" }, { "type": "uint32_t", "name": "bufferImageGranularity", - "value": "1u << 16", + "value": "1u << 10", "compare": "REVERSE", "comment": ["granularity, in bytes, at which buffer or linear image resources, and optimal image resources can be bound to adjacent offsets in the same allocation"] }, @@ -135,7 +135,7 @@ { "type": "uint32_t", "name": "maxBoundDescriptorSets", - "value": 4, + "value": 8, "expose": "DISABLE", "comment": ["[DO NOT EXPOSE] we've kinda hardcoded the engine to 4 currently"] } @@ -195,7 +195,7 @@ { "type": "uint32_t", "name": "maxDescriptorSetUBOs", - "value": 90 + "value": 155 }, { "type": "uint32_t", @@ -236,13 +236,13 @@ { "type": "uint8_t", "name": "maxVertexInputAttributes", - "value": 16, + "value": 29, "expose": "DISABLE" }, { "type": "uint8_t", "name": "maxVertexInputBindings", - "value": 16, + "value": 31, "expose": "DISABLE" }, { @@ -270,42 +270,42 @@ { "type": "uint16_t", "name": "maxTessellationGenerationLevel", - "value": 0 + "value": 64 }, { "type": "uint16_t", "name": "maxTessellationPatchSize", - "value": 0 + "value": 32 }, { "type": "uint16_t", "name": "maxTessellationControlPerVertexInputComponents", - "value": 0 + "value": 124 }, { "type": "uint16_t", "name": "maxTessellationControlPerVertexOutputComponents", - "value": 0 + "value": 124 }, { "type": "uint16_t", "name": "maxTessellationControlPerPatchOutputComponents", - "value": 0 + "value": 120 }, { "type": "uint16_t", "name": "maxTessellationControlTotalOutputComponents", - "value": 0 + "value": 2048 }, { "type": "uint16_t", "name": "maxTessellationEvaluationInputComponents", - "value": 0 + "value": 124 }, { "type": "uint16_t", "name": "maxTessellationEvaluationOutputComponents", - "value": 0 + "value": 124 } ] }, @@ -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" } ] } @@ -915,69 +915,67 @@ { "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,45 +990,45 @@ { "type": "bool", "name": "shaderUniformBufferArrayNonUniformIndexingNative", - "value": false + "value": true }, { "type": "bool", "name": "shaderSampledImageArrayNonUniformIndexingNative", - "value": false, + "value": true, "comment": ["promotion candidate"] }, { "type": "bool", "name": "shaderStorageBufferArrayNonUniformIndexingNative", - "value": false + "value": true }, { "type": "bool", "name": "shaderStorageImageArrayNonUniformIndexingNative", - "value": false, + "value": true, "comment": ["promotion candidate"] }, { "type": "bool", "name": "shaderInputAttachmentArrayNonUniformIndexingNative", - "value": false, + "value": true, "comment": ["promotion candidate"] }, { "type": "bool", "name": "robustBufferAccessUpdateAfterBind", - "value": false + "value": true }, { "type": "bool", "name": "quadDivergentImplicitLod", - "value": false + "value": true }, { "type": "uint32_t", "name": "maxPerStageDescriptorUpdateAfterBindSamplers", - "value": 500000 + "value": "1 << 10" }, { "type": "uint32_t", @@ -1040,17 +1038,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 +1058,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 +1078,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 +1108,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 +1118,12 @@ { "type": "bool", "name": "independentResolveNone", - "value": false + "value": true }, { "type": "bool", "name": "independentResolve", - "value": false + "value": true } ] }, @@ -1176,18 +1174,18 @@ { "type": "uint8_t", "name": "minSubgroupSize", - "value": "64", + "value": "32", "compare": "REVERSE" }, { "type": "uint8_t", "name": "maxSubgroupSize", - "value": "4" + "value": "32" }, { "type": "uint32_t", "name": "maxComputeWorkgroupSubgroups", - "value": "16" + "value": "32" }, { "type": "core::bitflag", @@ -1245,152 +1243,152 @@ { "type": "bool", "name": "integerDotProduct8BitUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct8BitSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct8BitMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct4x8BitPackedUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct4x8BitPackedSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct4x8BitPackedMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct16BitUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct16BitSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct16BitMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct32BitUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct32BitSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct32BitMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct64BitUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct64BitSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProduct64BitMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating8BitUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating8BitSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating16BitUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating16BitSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating32BitUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating32BitSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating64BitUnsignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating64BitSignedAccelerated", - "value": false + "value": true }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated", - "value": false + "value": true } ] }, @@ -1442,7 +1440,7 @@ { "type": "uint32_t", "name": "minImportedHostPointerAlignment", - "value": "0x1u << 31", + "value": "0x1u << 14u", "compare": "REVERSE", "comment": [ "VK_EXT_external_memory_host", @@ -1575,7 +1573,7 @@ { "type": "uint32_t", "name": "maxPushDescriptors", - "value": 0, + "value": 32, "expose": "DISABLE", "comment": [ "[TODO LATER] to expose but contingent on the TODO to implement one day", @@ -1914,7 +1912,7 @@ { "type": "uint32_t", "name": "lineSubPixelPrecisionBits", - "value": 0, + "value": 4, "comment": [ "[TODO] this feature introduces new/more pipeline state with VkPipelineRasterizationLineStateCreateInfoEXT", "VK_EXT_line_rasterization", @@ -2078,13 +2076,13 @@ { "type": "bool", "name": "graphicsPipelineLibraryFastLinking", - "value": false, + "value": true, "expose": "DISABLE" }, { "type": "bool", "name": "graphicsPipelineLibraryIndependentInterpolationDecoration", - "value": false, + "value": true, "expose": "DISABLE" } ] @@ -2141,29 +2139,29 @@ { "type": "bool", "name": "workgroupMemoryExplicitLayout", - "value": false + "value": true }, { "type": "bool", "name": "workgroupMemoryExplicitLayoutScalarBlockLayout", - "value": false + "value": true }, { "type": "bool", "name": "workgroupMemoryExplicitLayout8BitAccess", - "value": false + "value": true }, { "type": "bool", "name": "workgroupMemoryExplicitLayout16BitAccess", - "value": false + "value": true } ] }, { "type": "bool", "name": "colorWriteEnable", - "value": false, + "value": true, "comment": [ "[TODO] need new commandbuffer methods, etc", "VK_EXT_color_write_enable", @@ -2173,7 +2171,7 @@ { "type": "core::bitflag", "name": "cooperativeMatrixSupportedStages", - "value": "asset::IShader::E_SHADER_STAGE::ESS_UNKNOWN", + "value": "asset::IShader::E_SHADER_STAGE::ESS_COMPUTE | asset::IShader::E_SHADER_STAGE::ESS_ALL", "comment": [ "CooperativeMatrixPropertiesKHR", "VK_KHR_cooperative_matrix" From c8cf8f41290c9f4a6d6700bb33d3f083edba7b1b Mon Sep 17 00:00:00 2001 From: Ali Cheraghi Date: Tue, 4 Feb 2025 12:42:51 +0330 Subject: [PATCH 2/4] video: correct limits/features values Signed-off-by: Ali Cheraghi --- src/nbl/video/CVulkanPhysicalDevice.cpp | 30 ++-- .../device_capabilities/device_features.json | 26 ++-- .../device_capabilities/device_limits.json | 136 +++++++++--------- 3 files changed, 102 insertions(+), 90 deletions(-) diff --git a/src/nbl/video/CVulkanPhysicalDevice.cpp b/src/nbl/video/CVulkanPhysicalDevice.cpp index b4a5c50945..221b0afc26 100644 --- a/src/nbl/video/CVulkanPhysicalDevice.cpp +++ b/src/nbl/video/CVulkanPhysicalDevice.cpp @@ -304,7 +304,9 @@ 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 }; //! Because Renderdoc is special and instead of ignoring extensions it whitelists them @@ -329,8 +331,10 @@ 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)) @@ -604,9 +608,11 @@ 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 if (isExtensionSupported(VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME)) @@ -701,7 +707,9 @@ 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 if (isExtensionSupported(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME)) addToPNextChain(&conditionalRenderingFeatures); if (isExtensionSupported(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME)) @@ -895,11 +903,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; @@ -972,8 +978,8 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart properties.limits.shaderZeroInitializeWorkgroupMemory = vulkan13Features.shaderZeroInitializeWorkgroupMemory; - if (!vulkan13Features.dynamicRendering) - return nullptr; + // not checking dynamicRendering + if (!vulkan13Features.shaderIntegerDotProduct) return nullptr; if (!vulkan13Features.maintenance4) @@ -1120,9 +1126,11 @@ 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)) @@ -1567,9 +1575,10 @@ 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 #undef REQUIRE_EXTENSION_IF @@ -1812,9 +1821,10 @@ 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 // convert a set into a vector core::vector extensionStrings(extensionsToEnable.size()); diff --git a/src/nbl/video/device_capabilities/device_features.json b/src/nbl/video/device_capabilities/device_features.json index fa1473fcea..8c54cc55d0 100644 --- a/src/nbl/video/device_capabilities/device_features.json +++ b/src/nbl/video/device_capabilities/device_features.json @@ -8,7 +8,7 @@ { "type": "bool", "name": "robustBufferAccess", - "value": true, + "value": false, "comment": ["widely supported but has performance overhead, so remains an optional feature to enable"] }, { @@ -49,7 +49,7 @@ { "type": "bool", "name": "tessellationShader", - "value": true + "value": false } ] }, @@ -203,7 +203,7 @@ { "type": "bool", "name": "vertexPipelineStoresAndAtomics", - "value": true, + "value": false, "expose": "MOVE_TO_LIMIT", "comment": [ "All iOS GPUs don't support" @@ -212,16 +212,16 @@ { "type": "bool", "name": "fragmentStoresAndAtomics", - "value": true, + "value": false, "expose": "MOVE_TO_LIMIT", "comment": [ - "ROADMAP 2024 no supporton iOS GPUs" + "ROADMAP 2024" ] }, { "type": "bool", "name": "shaderTessellationAndGeometryPointSize", - "value": true, + "value": false, "expose": "MOVE_TO_LIMIT", "comment": [ "Candidate for promotion, just need to look into Linux and Android" @@ -544,7 +544,7 @@ { "type": "bool", "name": "samplerYcbcrConversion", - "value": true, + "value": false, "expose": "DISABLE", "comment": [ "[DO NOT EXPOSE] ROADMAP 2024 Enables certain formats in Vulkan", @@ -578,7 +578,7 @@ { "type": "bool", "name": "drawIndirectCount", - "value": true, + "value": false, "expose": "MOVE_TO_LIMIT", "comment": [ "[EXPOSE AS A LIMIT] ROADMAP 2022 requires support but MoltenVK doesn't support", @@ -699,7 +699,7 @@ "type": "bool", "name": "shaderUniformBufferArrayNonUniformIndexing", "value": true, - "expose": "MOVE_TO_LIMIT", + "expose": "REQUIRE", "comment": ["[EXPOSE AS A LIMIT] ROADMAP 2024 mandates but poor device support"] }, { @@ -726,7 +726,7 @@ "type": "bool", "name": "shaderInputAttachmentArrayNonUniformIndexing", "value": true, - "expose": "MOVE_TO_LIMIT", + "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"] }, { @@ -836,7 +836,7 @@ { "type": "bool", "name": "imagelessFramebuffer", - "value": true, + "value": false, "expose": "DISABLE", "comment": [ "[DO NOT EXPOSE] Decided against exposing, API is braindead, for details see: https://github.com/Devsh-Graphics-Programming/Nabla/issues/378", @@ -950,14 +950,14 @@ { "type": "bool", "name": "shaderOutputViewportIndex", - "value": true, + "value": false, "expose": "MOVE_TO_LIMIT", "comment": ["ALIAS: VK_EXT_shader_viewport_index_layer"] }, { "type": "bool", "name": "shaderOutputLayer", - "value": true, + "value": false, "expose": "MOVE_TO_LIMIT", "comment": ["ALIAS: VK_EXT_shader_viewport_index_layer"] } diff --git a/src/nbl/video/device_capabilities/device_limits.json b/src/nbl/video/device_capabilities/device_limits.json index 9744a6610b..7f4b3af259 100644 --- a/src/nbl/video/device_capabilities/device_limits.json +++ b/src/nbl/video/device_capabilities/device_limits.json @@ -91,7 +91,7 @@ { "type": "uint32_t", "name": "maxBufferViewTexels", - "value": "1u << 26" + "value": "1u << 25" }, { "type": "uint32_t", @@ -121,7 +121,7 @@ { "type": "uint32_t", "name": "bufferImageGranularity", - "value": "1u << 10", + "value": "1u << 16", "compare": "REVERSE", "comment": ["granularity, in bytes, at which buffer or linear image resources, and optimal image resources can be bound to adjacent offsets in the same allocation"] }, @@ -135,7 +135,7 @@ { "type": "uint32_t", "name": "maxBoundDescriptorSets", - "value": 8, + "value": 4, "expose": "DISABLE", "comment": ["[DO NOT EXPOSE] we've kinda hardcoded the engine to 4 currently"] } @@ -236,13 +236,13 @@ { "type": "uint8_t", "name": "maxVertexInputAttributes", - "value": 29, + "value": 16, "expose": "DISABLE" }, { "type": "uint8_t", "name": "maxVertexInputBindings", - "value": 31, + "value": 16, "expose": "DISABLE" }, { @@ -915,67 +915,69 @@ { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat64", - "value": true + "value": false }, { "type": "bool", "name": "shaderDenormPreserveFloat16", - "value": true + "value": false }, { "type": "bool", "name": "shaderDenormPreserveFloat32", - "value": true + "value": false }, { "type": "bool", "name": "shaderDenormPreserveFloat64", - "value": true + "value": false }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat16", - "value": true + "value": false }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat32", - "value": true + "value": false }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat64", - "value": true + "value": false }, { "type": "bool", "name": "shaderRoundingModeRTEFloat16", - "value": true + "value": false, + "comment": ["ROADMAP2024 but no good support yet"] }, { "type": "bool", "name": "shaderRoundingModeRTEFloat32", - "value": true + "value": false, + "comment": ["ROADMAP2024 but no good support yet"] }, { "type": "bool", "name": "shaderRoundingModeRTEFloat64", - "value": true + "value": false }, { "type": "bool", "name": "shaderRoundingModeRTZFloat16", - "value": true + "value": false }, { "type": "bool", "name": "shaderRoundingModeRTZFloat32", - "value": true + "value": false }, { "type": "bool", "name": "shaderRoundingModeRTZFloat64", - "value": true + "value": false } ] }, @@ -990,40 +992,40 @@ { "type": "bool", "name": "shaderUniformBufferArrayNonUniformIndexingNative", - "value": true + "value": false }, { "type": "bool", "name": "shaderSampledImageArrayNonUniformIndexingNative", - "value": true, + "value": false, "comment": ["promotion candidate"] }, { "type": "bool", "name": "shaderStorageBufferArrayNonUniformIndexingNative", - "value": true + "value": false }, { "type": "bool", "name": "shaderStorageImageArrayNonUniformIndexingNative", - "value": true, + "value": false, "comment": ["promotion candidate"] }, { "type": "bool", "name": "shaderInputAttachmentArrayNonUniformIndexingNative", - "value": true, + "value": false, "comment": ["promotion candidate"] }, { "type": "bool", "name": "robustBufferAccessUpdateAfterBind", - "value": true + "value": false }, { "type": "bool", "name": "quadDivergentImplicitLod", - "value": true + "value": false }, { "type": "uint32_t", @@ -1174,18 +1176,18 @@ { "type": "uint8_t", "name": "minSubgroupSize", - "value": "32", + "value": "64", "compare": "REVERSE" }, { "type": "uint8_t", "name": "maxSubgroupSize", - "value": "32" + "value": "4" }, { "type": "uint32_t", "name": "maxComputeWorkgroupSubgroups", - "value": "32" + "value": "16" }, { "type": "core::bitflag", @@ -1243,152 +1245,152 @@ { "type": "bool", "name": "integerDotProduct8BitUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct8BitSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct8BitMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct4x8BitPackedUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct4x8BitPackedSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct4x8BitPackedMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct16BitUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct16BitSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct16BitMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct32BitUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct32BitSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct32BitMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct64BitUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct64BitSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProduct64BitMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating8BitUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating8BitSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating16BitUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating16BitSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating32BitUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating32BitSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating64BitUnsignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating64BitSignedAccelerated", - "value": true + "value": false }, { "type": "bool", "name": "integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated", - "value": true + "value": false } ] }, @@ -1440,7 +1442,7 @@ { "type": "uint32_t", "name": "minImportedHostPointerAlignment", - "value": "0x1u << 14u", + "value": "0x1u << 31", "compare": "REVERSE", "comment": [ "VK_EXT_external_memory_host", @@ -1573,7 +1575,7 @@ { "type": "uint32_t", "name": "maxPushDescriptors", - "value": 32, + "value": 0, "expose": "DISABLE", "comment": [ "[TODO LATER] to expose but contingent on the TODO to implement one day", @@ -2076,13 +2078,13 @@ { "type": "bool", "name": "graphicsPipelineLibraryFastLinking", - "value": true, + "value": false, "expose": "DISABLE" }, { "type": "bool", "name": "graphicsPipelineLibraryIndependentInterpolationDecoration", - "value": true, + "value": false, "expose": "DISABLE" } ] @@ -2139,22 +2141,22 @@ { "type": "bool", "name": "workgroupMemoryExplicitLayout", - "value": true + "value": false }, { "type": "bool", "name": "workgroupMemoryExplicitLayoutScalarBlockLayout", - "value": true + "value": false }, { "type": "bool", "name": "workgroupMemoryExplicitLayout8BitAccess", - "value": true + "value": false }, { "type": "bool", "name": "workgroupMemoryExplicitLayout16BitAccess", - "value": true + "value": false } ] }, @@ -2171,7 +2173,7 @@ { "type": "core::bitflag", "name": "cooperativeMatrixSupportedStages", - "value": "asset::IShader::E_SHADER_STAGE::ESS_COMPUTE | asset::IShader::E_SHADER_STAGE::ESS_ALL", + "value": "asset::IShader::E_SHADER_STAGE::ESS_UNKNOWN", "comment": [ "CooperativeMatrixPropertiesKHR", "VK_KHR_cooperative_matrix" From 7e471b4197ad02ba064c80eb9e6acfe65b0b69f6 Mon Sep 17 00:00:00 2001 From: Ali Cheraghi Date: Thu, 6 Feb 2025 00:17:19 +0330 Subject: [PATCH 3/4] video: fix remaining limits/features/checks Signed-off-by: Ali Cheraghi --- src/nbl/video/CVulkanPhysicalDevice.cpp | 74 +++++++++--------- src/nbl/video/ILogicalDevice.cpp | 26 ------- .../device_capabilities/device_features.json | 23 ++++-- .../device_capabilities/device_limits.json | 75 +++++++++++++------ 4 files changed, 106 insertions(+), 92 deletions(-) diff --git a/src/nbl/video/CVulkanPhysicalDevice.cpp b/src/nbl/video/CVulkanPhysicalDevice.cpp index 221b0afc26..1201a27fc8 100644 --- a/src/nbl/video/CVulkanPhysicalDevice.cpp +++ b/src/nbl/video/CVulkanPhysicalDevice.cpp @@ -304,9 +304,7 @@ 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 }; //! Because Renderdoc is special and instead of ignoring extensions it whitelists them @@ -331,10 +329,8 @@ 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)) @@ -398,19 +394,32 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart return nullptr; if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat32) return nullptr; - properties.limits.shaderSignedZeroInfNanPreserveFloat64 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64; - properties.limits.shaderDenormPreserveFloat16 = vulkan12Properties.shaderDenormPreserveFloat16; - 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.shaderRoundingModeRTZFloat64 = vulkan12Properties.shaderRoundingModeRTZFloat64; + if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64) + return nullptr; + if (!vulkan12Properties.shaderDenormPreserveFloat16) + return nullptr; + if (!vulkan12Properties.shaderDenormPreserveFloat32) + return nullptr; + if (!vulkan12Properties.shaderDenormPreserveFloat64) + return nullptr; + if (!vulkan12Properties.shaderDenormFlushToZeroFloat16) + return nullptr; + if (!vulkan12Properties.shaderDenormFlushToZeroFloat32) + return nullptr; + if (!vulkan12Properties.shaderDenormFlushToZeroFloat64) + return nullptr; + if (!vulkan12Properties.shaderRoundingModeRTEFloat16) + return nullptr; + if (!vulkan12Properties.shaderRoundingModeRTEFloat32) + return nullptr; + if (!vulkan12Properties.shaderRoundingModeRTEFloat64) + return nullptr; + if (!vulkan12Properties.shaderRoundingModeRTZFloat16) + return nullptr; + if (!vulkan12Properties.shaderRoundingModeRTZFloat32) + return nullptr; + if (!vulkan12Properties.shaderRoundingModeRTZFloat64) + return nullptr; // descriptor indexing properties.limits.maxUpdateAfterBindDescriptorsInAllPools = vulkan12Properties.maxUpdateAfterBindDescriptorsInAllPools; @@ -439,8 +448,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; @@ -608,10 +618,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 +716,8 @@ 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 + if (isExtensionSupported(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME)) addToPNextChain(&conditionalRenderingFeatures); if (isExtensionSupported(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME)) @@ -1126,10 +1134,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 */ @@ -1202,10 +1209,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.cooperativeMatrixRobustBufferAccess = cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess; } // we compare all limits against the defaults easily! @@ -1575,10 +1581,9 @@ 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 #undef REQUIRE_EXTENSION_IF @@ -1821,10 +1826,11 @@ 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.cooperativeMatrix = enabledFeatures.cooperativeMatrix; + cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess = enabledFeatures.cooperativeMatrixRobustBufferAccess; + } // 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 8c54cc55d0..a0ea94d2c9 100644 --- a/src/nbl/video/device_capabilities/device_features.json +++ b/src/nbl/video/device_capabilities/device_features.json @@ -980,7 +980,7 @@ { "type": "bool", "name": "robustImageAccess", - "value": true, + "value": false, "comment": [ "This feature adds stricter requirements for how out of bounds reads from images are handled.", "Rather than returning undefined values,", @@ -1106,7 +1106,7 @@ { "type": "bool", "name": "dynamicRendering", - "value": true, + "value": false, "expose": "DISABLE", "comment": [ "[DO NOT EXPOSE] EVIL", @@ -4138,13 +4138,20 @@ ] }, { - "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 + }, + { + "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 7f4b3af259..6ab046530b 100644 --- a/src/nbl/video/device_capabilities/device_limits.json +++ b/src/nbl/video/device_capabilities/device_limits.json @@ -904,80 +904,91 @@ "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat16", "value": true, - "expose": "DISABLE" + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat32", "value": true, - "expose": "DISABLE" + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat64", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderDenormPreserveFloat16", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderDenormPreserveFloat32", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderDenormPreserveFloat64", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat16", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat32", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat64", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderRoundingModeRTEFloat16", - "value": false, - "comment": ["ROADMAP2024 but no good support yet"] + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderRoundingModeRTEFloat32", - "value": false, - "comment": ["ROADMAP2024 but no good support yet"] + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderRoundingModeRTEFloat64", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderRoundingModeRTZFloat16", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderRoundingModeRTZFloat32", - "value": false + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "shaderRoundingModeRTZFloat64", - "value": false + "value": true, + "expose": "REQUIRE" } ] }, @@ -1120,12 +1131,14 @@ { "type": "bool", "name": "independentResolveNone", - "value": true + "value": true, + "expose": "REQUIRE" }, { "type": "bool", "name": "independentResolve", - "value": true + "value": true, + "expose": "REQUIRE" } ] }, @@ -1176,7 +1189,7 @@ { "type": "uint8_t", "name": "minSubgroupSize", - "value": "64", + "value": "32", "compare": "REVERSE" }, { @@ -1914,7 +1927,7 @@ { "type": "uint32_t", "name": "lineSubPixelPrecisionBits", - "value": 4, + "value": 0, "comment": [ "[TODO] this feature introduces new/more pipeline state with VkPipelineRasterizationLineStateCreateInfoEXT", "VK_EXT_line_rasterization", @@ -2171,12 +2184,26 @@ ] }, { - "type": "core::bitflag", - "name": "cooperativeMatrixSupportedStages", - "value": "asset::IShader::E_SHADER_STAGE::ESS_UNKNOWN", "comment": [ "CooperativeMatrixPropertiesKHR", "VK_KHR_cooperative_matrix" + ], + "entries": [ + { + "type": "bool", + "name": "cooperativeMatrix", + "value": false + }, + { + "type": "bool", + "name": "cooperativeMatrixRobustBufferAccess", + "value": false + }, + { + "type": "core::bitflag", + "name": "cooperativeMatrixSupportedStages", + "value": "asset::IShader::E_SHADER_STAGE::ESS_UNKNOWN" + } ] } ], From 6959216d072926884492dd4c652c6264c322c38f Mon Sep 17 00:00:00 2001 From: Ali Cheraghi Date: Fri, 7 Feb 2025 18:42:54 +0330 Subject: [PATCH 4/4] video: check for maintenance5 and graphics_pipline_library Signed-off-by: Ali Cheraghi --- src/nbl/video/CVulkanPhysicalDevice.cpp | 126 ++++++++++++------ .../device_capabilities/device_features.json | 6 +- .../device_capabilities/device_limits.json | 98 +++++--------- 3 files changed, 124 insertions(+), 106 deletions(-) diff --git a/src/nbl/video/CVulkanPhysicalDevice.cpp b/src/nbl/video/CVulkanPhysicalDevice.cpp index 1201a27fc8..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; @@ -307,6 +310,8 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart VkPhysicalDeviceCooperativeMatrixPropertiesKHR cooperativeMatrixProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR }; 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); @@ -333,8 +338,10 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart addToPNextChain(&cooperativeMatrixProperties); 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); @@ -390,44 +397,25 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart //vulkan12Properties.denormBehaviorIndependence; //vulkan12Properties.denormBehaviorIndependence; - if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat16) - return nullptr; - if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat32) - return nullptr; - if (!vulkan12Properties.shaderSignedZeroInfNanPreserveFloat64) - return nullptr; - if (!vulkan12Properties.shaderDenormPreserveFloat16) - return nullptr; - if (!vulkan12Properties.shaderDenormPreserveFloat32) - return nullptr; - if (!vulkan12Properties.shaderDenormPreserveFloat64) - return nullptr; - if (!vulkan12Properties.shaderDenormFlushToZeroFloat16) - return nullptr; - if (!vulkan12Properties.shaderDenormFlushToZeroFloat32) - return nullptr; - if (!vulkan12Properties.shaderDenormFlushToZeroFloat64) - return nullptr; - if (!vulkan12Properties.shaderRoundingModeRTEFloat16) - return nullptr; - if (!vulkan12Properties.shaderRoundingModeRTEFloat32) - return nullptr; - if (!vulkan12Properties.shaderRoundingModeRTEFloat64) - return nullptr; - if (!vulkan12Properties.shaderRoundingModeRTZFloat16) - return nullptr; - if (!vulkan12Properties.shaderRoundingModeRTZFloat32) - return nullptr; - if (!vulkan12Properties.shaderRoundingModeRTZFloat64) - return nullptr; - + properties.limits.shaderSignedZeroInfNanPreserveFloat32 = vulkan12Properties.shaderSignedZeroInfNanPreserveFloat32; + properties.limits.shaderDenormPreserveFloat32 = vulkan12Properties.shaderDenormPreserveFloat32; + properties.limits.shaderDenormFlushToZeroFloat32 = vulkan12Properties.shaderDenormFlushToZeroFloat32; + properties.limits.shaderRoundingModeRTEFloat32 = vulkan12Properties.shaderRoundingModeRTEFloat32; + 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; @@ -716,7 +704,9 @@ 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 }; - VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR }; + 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); @@ -781,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); @@ -903,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; @@ -1138,7 +1169,6 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart if (isExtensionSupported(VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) features.cooperativeMatrixRobustBufferAccess = cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess; - /* Vulkan Extensions Features as Limits */ if (isExtensionSupported(VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME)) properties.limits.shaderSMBuiltins = shaderSMBuiltinsFeaturesNV.shaderSMBuiltins; @@ -1211,7 +1241,7 @@ std::unique_ptr CVulkanPhysicalDevice::create(core::smart properties.limits.colorWriteEnable = colorWriteEnableFeatures.colorWriteEnable; if (isExtensionSupported(VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) - properties.limits.cooperativeMatrixRobustBufferAccess = cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess; + properties.limits.cooperativeMatrix = cooperativeMatrixFeatures.cooperativeMatrix; } // we compare all limits against the defaults easily! @@ -1584,6 +1614,16 @@ core::smart_refctd_ptr CVulkanPhysicalDevice::createLogicalDevic VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR,nullptr }; REQUIRE_EXTENSION_IF(enabledFeatures.cooperativeMatrixRobustBufferAccess,VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME,&cooperativeMatrixFeatures); + + 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 @@ -1828,10 +1868,12 @@ core::smart_refctd_ptr CVulkanPhysicalDevice::createLogicalDevic //colorWriteEnableFeatures [LIMIT SO ENABLE EVERYTHING BY DEFAULT] if (limits.cooperativeMatrix) { - cooperativeMatrixFeatures.cooperativeMatrix = enabledFeatures.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/device_capabilities/device_features.json b/src/nbl/video/device_capabilities/device_features.json index a0ea94d2c9..cd68831495 100644 --- a/src/nbl/video/device_capabilities/device_features.json +++ b/src/nbl/video/device_capabilities/device_features.json @@ -999,7 +999,7 @@ { "type": "bool", "name": "inlineUniformBlock", - "value": true, + "value": false, "expose": "DISABLE", "comment": ["Vulkan 1.3, Nabla Core Profile:"] }, @@ -3202,7 +3202,6 @@ "value": null, "expose": "DISABLE", "comment": [ - "[TODO] this one isn't in the headers yet", "GraphicsPipelineLibraryFeaturesEXT", "VK_EXT_graphics_pipeline_library" ] @@ -4145,7 +4144,8 @@ { "type": "bool", "name": "cooperativeMatrix", - "value": false + "value": false, + "expose": "MOVE_TO_LIMIT" }, { "type": "bool", diff --git a/src/nbl/video/device_capabilities/device_limits.json b/src/nbl/video/device_capabilities/device_limits.json index 6ab046530b..9aad66d944 100644 --- a/src/nbl/video/device_capabilities/device_limits.json +++ b/src/nbl/video/device_capabilities/device_limits.json @@ -270,42 +270,42 @@ { "type": "uint16_t", "name": "maxTessellationGenerationLevel", - "value": 64 + "value": 0 }, { "type": "uint16_t", "name": "maxTessellationPatchSize", - "value": 32 + "value": 0 }, { "type": "uint16_t", "name": "maxTessellationControlPerVertexInputComponents", - "value": 124 + "value": 0 }, { "type": "uint16_t", "name": "maxTessellationControlPerVertexOutputComponents", - "value": 124 + "value": 0 }, { "type": "uint16_t", "name": "maxTessellationControlPerPatchOutputComponents", - "value": 120 + "value": 0 }, { "type": "uint16_t", "name": "maxTessellationControlTotalOutputComponents", - "value": 2048 + "value": 0 }, { "type": "uint16_t", "name": "maxTessellationEvaluationInputComponents", - "value": 124 + "value": 0 }, { "type": "uint16_t", "name": "maxTessellationEvaluationOutputComponents", - "value": 124 + "value": 0 } ] }, @@ -903,92 +903,77 @@ { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat16", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat32", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderSignedZeroInfNanPreserveFloat64", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderDenormPreserveFloat16", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderDenormPreserveFloat32", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderDenormPreserveFloat64", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat16", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat32", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderDenormFlushToZeroFloat64", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTEFloat16", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTEFloat32", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTEFloat64", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTZFloat16", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTZFloat32", - "value": true, - "expose": "REQUIRE" + "value": true }, { "type": "bool", "name": "shaderRoundingModeRTZFloat64", - "value": true, - "expose": "REQUIRE" + "value": true } ] }, @@ -1003,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"] }, { @@ -2176,7 +2166,7 @@ { "type": "bool", "name": "colorWriteEnable", - "value": true, + "value": false, "comment": [ "[TODO] need new commandbuffer methods, etc", "VK_EXT_color_write_enable", @@ -2184,26 +2174,12 @@ ] }, { + "type": "core::bitflag", + "name": "cooperativeMatrixSupportedStages", + "value": "asset::IShader::E_SHADER_STAGE::ESS_UNKNOWN", "comment": [ "CooperativeMatrixPropertiesKHR", "VK_KHR_cooperative_matrix" - ], - "entries": [ - { - "type": "bool", - "name": "cooperativeMatrix", - "value": false - }, - { - "type": "bool", - "name": "cooperativeMatrixRobustBufferAccess", - "value": false - }, - { - "type": "core::bitflag", - "name": "cooperativeMatrixSupportedStages", - "value": "asset::IShader::E_SHADER_STAGE::ESS_UNKNOWN" - } ] } ],