From c1871cfde46293de0bed99de468186c28c494cb0 Mon Sep 17 00:00:00 2001 From: Juston Li Date: Fri, 26 Aug 2022 15:50:10 -0700 Subject: [PATCH] venus: add support for VK_EXT_primitive_topology_list_restart See: virgl/virglrenderer!902 olv/venus-protocol!46 Test: ./deqp-vk -n dEQP-VK.pipeline.monolithic.input_assembly.primitive_restart.* Test run totals: Passed: 55/55 (100.0%) Failed: 0/55 (0.0%) Not supported: 0/55 (0.0%) Warnings: 0/55 (0.0%) Waived: 0/55 (0.0%) Signed-off-by: Juston Li Part-of: --- src/virtio/vulkan/vn_physical_device.c | 9 +++++++++ src/virtio/vulkan/vn_physical_device.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c index d100810861b..d538559c156 100644 --- a/src/virtio/vulkan/vn_physical_device.c +++ b/src/virtio/vulkan/vn_physical_device.c @@ -163,6 +163,9 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev) VN_ADD_EXT_TO_PNEXT(exts->EXT_line_rasterization, feats->line_rasterization, LINE_RASTERIZATION_FEATURES_EXT, features2); + VN_ADD_EXT_TO_PNEXT(exts->EXT_primitive_topology_list_restart, + feats->primitive_topology_list_restart, + PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT, features2); VN_ADD_EXT_TO_PNEXT(exts->EXT_provoking_vertex, feats->provoking_vertex, PROVOKING_VERTEX_FEATURES_EXT, features2); VN_ADD_EXT_TO_PNEXT(exts->EXT_robustness2, feats->robustness_2, @@ -1059,6 +1062,7 @@ vn_physical_device_get_passthrough_extensions( .EXT_image_view_min_lod = true, .EXT_index_type_uint8 = true, .EXT_line_rasterization = true, + .EXT_primitive_topology_list_restart = true, .EXT_provoking_vertex = true, .EXT_queue_family_foreign = true, .EXT_robustness2 = true, @@ -1686,6 +1690,8 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceDepthClipEnableFeaturesEXT *depth_clip_enable; VkPhysicalDeviceIndexTypeUint8FeaturesEXT *index_type_uint8; VkPhysicalDeviceLineRasterizationFeaturesEXT *line_rasterization; + VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT + *primitive_topology_list_restart; VkPhysicalDeviceProvokingVertexFeaturesEXT *provoking_vertex; VkPhysicalDeviceRobustness2FeaturesEXT *robustness_2; VkPhysicalDeviceTransformFeedbackFeaturesEXT *transform_feedback; @@ -1898,6 +1904,9 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT: *u.line_rasterization = feats->line_rasterization; break; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: + *u.primitive_topology_list_restart = feats->primitive_topology_list_restart; + break; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: *u.provoking_vertex = feats->provoking_vertex; break; diff --git a/src/virtio/vulkan/vn_physical_device.h b/src/virtio/vulkan/vn_physical_device.h index 2185757f090..f271d3340f5 100644 --- a/src/virtio/vulkan/vn_physical_device.h +++ b/src/virtio/vulkan/vn_physical_device.h @@ -44,6 +44,8 @@ struct vn_physical_device_features { VkPhysicalDeviceImageViewMinLodFeaturesEXT image_view_min_lod; VkPhysicalDeviceIndexTypeUint8FeaturesEXT index_type_uint8; VkPhysicalDeviceLineRasterizationFeaturesEXT line_rasterization; + VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT + primitive_topology_list_restart; VkPhysicalDeviceProvokingVertexFeaturesEXT provoking_vertex; VkPhysicalDeviceRobustness2FeaturesEXT robustness_2; VkPhysicalDeviceTransformFeedbackFeaturesEXT transform_feedback;