From db61d45b94bf5cf7eee5a1a6da0724f49a0ef8e0 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 11 Sep 2024 12:43:58 +0200 Subject: [PATCH] radv: add new Vulkan 1.4 features/properties Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_physical_device.c | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index d840377fd0c..776e2d785cb 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -909,6 +909,29 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc .shaderIntegerDotProduct = true, .maintenance4 = true, + /* Vulkan 1.4 */ + .globalPriorityQuery = true, + .shaderSubgroupRotate = true, + .shaderSubgroupRotateClustered = true, + .shaderFloatControls2 = true, + .shaderExpectAssume = true, + .rectangularLines = true, + .bresenhamLines = true, + .smoothLines = true, + .stippledRectangularLines = false, + .stippledBresenhamLines = true, + .stippledSmoothLines = false, + .vertexAttributeInstanceRateDivisor = true, + .vertexAttributeInstanceRateZeroDivisor = true, + .indexTypeUint8 = pdev->info.gfx_level >= GFX8, + .dynamicRenderingLocalRead = true, + .maintenance5 = true, + .maintenance6 = true, + .pipelineProtectedAccess = false, + .pipelineRobustness = true, + .hostImageCopy = false, + .pushDescriptor = true, + /* VK_EXT_conditional_rendering */ .conditionalRendering = true, .inheritedConditionalRendering = false, @@ -1658,6 +1681,33 @@ radv_get_physical_device_properties(struct radv_physical_device *pdev) p->maxBufferSize = RADV_MAX_MEMORY_ALLOCATION_SIZE; + /* Vulkan 1.4 */ + p->lineSubPixelPrecisionBits = 4; + p->maxVertexAttribDivisor = UINT32_MAX; + p->supportsNonZeroFirstInstance = true; + p->maxPushDescriptors = MAX_PUSH_DESCRIPTORS; + p->dynamicRenderingLocalReadDepthStencilAttachments = true; + p->dynamicRenderingLocalReadMultisampledAttachments = true; + p->earlyFragmentMultisampleCoverageAfterSampleCounting = true; + p->earlyFragmentSampleMaskTestBeforeSampleCounting = true; + p->depthStencilSwizzleOneSupport = true; + p->polygonModePointSize = true; + p->nonStrictSinglePixelWideLinesUseParallelogram = true; + p->nonStrictWideLinesUseParallelogram = true; + p->blockTexelViewCompatibleMultipleLayers = true; + p->maxCombinedImageSamplerDescriptorCount = 1; + p->fragmentShadingRateClampCombinerInputs = true; + p->defaultRobustnessStorageBuffers = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS; + p->defaultRobustnessUniformBuffers = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS; + p->defaultRobustnessVertexInputs = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED; + p->defaultRobustnessImages = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2; + p->copySrcLayoutCount = 0; + p->pCopySrcLayouts = NULL; + p->copyDstLayoutCount = 0; + p->pCopyDstLayouts = NULL; + memset(p->optimalTilingLayoutUUID, 0, sizeof(p->optimalTilingLayoutUUID)); + p->identicalMemoryTypeRequirements = false; + /* VK_KHR_push_descriptor */ p->maxPushDescriptors = MAX_PUSH_DESCRIPTORS;