diff --git a/docs/features.txt b/docs/features.txt index 5e8561c9251..8247c277d2e 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -526,7 +526,7 @@ Vulkan 1.4 -- all DONE: anv, lvp, nvk, radv/gfx8+, tu/a7xx+ VK_KHR_vertex_attribute_divisor DONE (anv, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_host_image_copy DONE (anv, lvp, nvk/Turing+, tu) VK_EXT_pipeline_protected_access DONE (anv/gfx12+, vn) - VK_EXT_pipeline_robustness DONE (anv, lvp, nvk, panvk, radv, v3dv, tu) + VK_EXT_pipeline_robustness DONE (anv, lvp, nvk, panvk, radv, v3dv, tu, vn) Khronos extensions that are not part of any Vulkan version: diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c index f463619931f..f562e971a0a 100644 --- a/src/virtio/vulkan/vn_physical_device.c +++ b/src/virtio/vulkan/vn_physical_device.c @@ -166,6 +166,7 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev) VkPhysicalDeviceMaintenance5Features maintenance5; VkPhysicalDevicePipelineProtectedAccessFeatures pipeline_protected_access; + VkPhysicalDevicePipelineRobustnessFeatures pipeline_robustness; VkPhysicalDeviceShaderExpectAssumeFeatures shader_expect_assume; VkPhysicalDeviceShaderFloatControls2Features shader_float_controls_2; VkPhysicalDeviceShaderSubgroupRotateFeatures shader_subgroup_rotate; @@ -278,6 +279,7 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev) VN_ADD_PNEXT_EXT(feats2, LINE_RASTERIZATION_FEATURES, local_feats.line_rasterization, exts->KHR_line_rasterization || exts->EXT_line_rasterization); VN_ADD_PNEXT_EXT(feats2, MAINTENANCE_5_FEATURES, local_feats.maintenance5, exts->KHR_maintenance5); VN_ADD_PNEXT_EXT(feats2, PIPELINE_PROTECTED_ACCESS_FEATURES, local_feats.pipeline_protected_access, exts->EXT_pipeline_protected_access); + VN_ADD_PNEXT_EXT(feats2, PIPELINE_ROBUSTNESS_FEATURES, local_feats.pipeline_robustness, exts->EXT_pipeline_robustness); VN_ADD_PNEXT_EXT(feats2, SHADER_EXPECT_ASSUME_FEATURES, local_feats.shader_expect_assume, exts->KHR_shader_expect_assume); VN_ADD_PNEXT_EXT(feats2, SHADER_FLOAT_CONTROLS_2_FEATURES, local_feats.shader_float_controls_2, exts->KHR_shader_float_controls2); VN_ADD_PNEXT_EXT(feats2, SHADER_SUBGROUP_ROTATE_FEATURES, local_feats.shader_subgroup_rotate, exts->KHR_shader_subgroup_rotate); @@ -492,6 +494,7 @@ vn_physical_device_init_properties(struct vn_physical_device *physical_dev) /* Vulkan 1.4 */ VkPhysicalDeviceLineRasterizationProperties line_rasterization; VkPhysicalDeviceMaintenance5Properties maintenance_5; + VkPhysicalDevicePipelineRobustnessProperties pipeline_robustness; VkPhysicalDevicePushDescriptorProperties push_descriptor; VkPhysicalDeviceVertexAttributeDivisorProperties vertex_attribute_divisor; @@ -560,6 +563,7 @@ vn_physical_device_init_properties(struct vn_physical_device *physical_dev) /* Vulkan 1.4 */ VN_ADD_PNEXT_EXT(props2, LINE_RASTERIZATION_PROPERTIES, local_props.line_rasterization, exts->KHR_line_rasterization || exts->EXT_line_rasterization); VN_ADD_PNEXT_EXT(props2, MAINTENANCE_5_PROPERTIES, local_props.maintenance_5, exts->KHR_maintenance5); + VN_ADD_PNEXT_EXT(props2, PIPELINE_ROBUSTNESS_PROPERTIES, local_props.pipeline_robustness, exts->EXT_pipeline_robustness); VN_ADD_PNEXT_EXT(props2, PUSH_DESCRIPTOR_PROPERTIES, local_props.push_descriptor, exts->KHR_push_descriptor); VN_ADD_PNEXT_EXT(props2, VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES, local_props.vertex_attribute_divisor, exts->KHR_vertex_attribute_divisor); @@ -627,6 +631,7 @@ vn_physical_device_init_properties(struct vn_physical_device *physical_dev) /* Vulkan 1.4 */ VN_SET_VK_PROPS_EXT(props, &local_props.line_rasterization, exts->KHR_line_rasterization || exts->EXT_line_rasterization); VN_SET_VK_PROPS_EXT(props, &local_props.maintenance_5, exts->KHR_maintenance5); + VN_SET_VK_PROPS_EXT(props, &local_props.pipeline_robustness, exts->EXT_pipeline_robustness); VN_SET_VK_PROPS_EXT(props, &local_props.push_descriptor, exts->KHR_push_descriptor); VN_SET_VK_PROPS_EXT(props, &local_props.vertex_attribute_divisor, exts->KHR_vertex_attribute_divisor); @@ -1105,6 +1110,7 @@ vn_physical_device_get_passthrough_extensions( .KHR_shader_subgroup_rotate = true, .KHR_vertex_attribute_divisor = true, .EXT_pipeline_protected_access = true, + .EXT_pipeline_robustness = true, /* KHR */ .KHR_calibrated_timestamps = true, diff --git a/src/virtio/vulkan/vn_pipeline.c b/src/virtio/vulkan/vn_pipeline.c index 8c007a1f688..39064e0ec18 100644 --- a/src/virtio/vulkan/vn_pipeline.c +++ b/src/virtio/vulkan/vn_pipeline.c @@ -229,8 +229,7 @@ struct vn_graphics_pipeline_fix_tmp { /* Fixing the pNext chain * - * TODO: extend when below or more extensions are supported: - * - VK_EXT_pipeline_robustness + * Extend when more extensions are supported. */ VkGraphicsPipelineLibraryCreateInfoEXT *gpl_infos; VkPipelineCreateFlags2CreateInfo *flags2_infos; @@ -238,6 +237,7 @@ struct vn_graphics_pipeline_fix_tmp { VkPipelineFragmentShadingRateStateCreateInfoKHR *fsr_infos; VkPipelineLibraryCreateInfoKHR *library_infos; VkPipelineRenderingCreateInfo *rendering_infos; + VkPipelineRobustnessCreateInfo *robustness_infos; }; /* shader module commands */ @@ -656,6 +656,7 @@ vn_graphics_pipeline_fix_tmp_alloc(const VkAllocationCallbacks *alloc, VkPipelineFragmentShadingRateStateCreateInfoKHR *fsr_infos; VkPipelineLibraryCreateInfoKHR *library_infos; VkPipelineRenderingCreateInfo *rendering_infos; + VkPipelineRobustnessCreateInfo *robustness_infos; VK_MULTIALLOC(ma); vk_multialloc_add(&ma, &tmp, __typeof__(*tmp), 1); @@ -677,6 +678,8 @@ vn_graphics_pipeline_fix_tmp_alloc(const VkAllocationCallbacks *alloc, info_count); vk_multialloc_add(&ma, &rendering_infos, __typeof__(*rendering_infos), info_count); + vk_multialloc_add(&ma, &robustness_infos, __typeof__(*robustness_infos), + info_count); } if (!vk_multialloc_zalloc(&ma, alloc, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND)) @@ -694,6 +697,7 @@ vn_graphics_pipeline_fix_tmp_alloc(const VkAllocationCallbacks *alloc, tmp->fsr_infos = fsr_infos; tmp->library_infos = library_infos; tmp->rendering_infos = rendering_infos; + tmp->robustness_infos = robustness_infos; } return tmp; @@ -1497,6 +1501,8 @@ vn_graphics_pipeline_create_info_pnext_init( VkPipelineLibraryCreateInfoKHR *library = &fix_tmp->library_infos[index]; VkPipelineRenderingCreateInfo *rendering = &fix_tmp->rendering_infos[index]; + VkPipelineRobustnessCreateInfo *robustness = + &fix_tmp->robustness_infos[index]; VkBaseOutStructure *cur = (void *)&fix_tmp->infos[index]; @@ -1527,6 +1533,10 @@ vn_graphics_pipeline_create_info_pnext_init( memcpy(rendering, src, sizeof(*rendering)); next = rendering; break; + case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: + memcpy(robustness, src, sizeof(*robustness)); + next = robustness; + break; default: break; }