diff --git a/src/virtio/vulkan/vn_command_buffer.c b/src/virtio/vulkan/vn_command_buffer.c index 155d23f5e18..b70fbb1cc18 100644 --- a/src/virtio/vulkan/vn_command_buffer.c +++ b/src/virtio/vulkan/vn_command_buffer.c @@ -1564,3 +1564,18 @@ vn_CmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VN_CMD_ENQUEUE(vkCmdSetRasterizerDiscardEnable, commandBuffer, rasterizerDiscardEnable); } + +void +vn_CmdBeginConditionalRenderingEXT( + VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfoEXT *pConditionalRenderingBegin) +{ + VN_CMD_ENQUEUE(vkCmdBeginConditionalRenderingEXT, commandBuffer, + pConditionalRenderingBegin); +} + +void +vn_CmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer) +{ + VN_CMD_ENQUEUE(vkCmdEndConditionalRenderingEXT, commandBuffer); +} diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c index eced424fcff..88d12ca0882 100644 --- a/src/virtio/vulkan/vn_physical_device.c +++ b/src/virtio/vulkan/vn_physical_device.c @@ -135,11 +135,16 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev) features2); /* EXT */ + VN_ADD_EXT_TO_PNEXT(exts->EXT_conditional_rendering, + feats->conditional_rendering, + CONDITIONAL_RENDERING_FEATURES_EXT, features2); VN_ADD_EXT_TO_PNEXT(exts->EXT_custom_border_color, feats->custom_border_color, CUSTOM_BORDER_COLOR_FEATURES_EXT, features2); VN_ADD_EXT_TO_PNEXT(exts->EXT_depth_clip_enable, feats->depth_clip_enable, DEPTH_CLIP_ENABLE_FEATURES_EXT, features2); + VN_ADD_EXT_TO_PNEXT(exts->EXT_index_type_uint8, feats->index_type_uint8, + INDEX_TYPE_UINT8_FEATURES_EXT, features2); VN_ADD_EXT_TO_PNEXT(exts->EXT_line_rasterization, feats->line_rasterization, LINE_RASTERIZATION_FEATURES_EXT, features2); @@ -948,12 +953,14 @@ vn_physical_device_get_passthrough_extensions( /* EXT */ .EXT_calibrated_timestamps = true, + .EXT_conditional_rendering = true, .EXT_conservative_rasterization = true, .EXT_custom_border_color = true, .EXT_depth_clip_enable = true, #ifndef ANDROID .EXT_image_drm_format_modifier = true, #endif + .EXT_index_type_uint8 = true, .EXT_line_rasterization = true, .EXT_provoking_vertex = true, .EXT_queue_family_foreign = true, @@ -1581,8 +1588,10 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, *shader_demote_to_helper_invocation; /* EXT */ + VkPhysicalDeviceConditionalRenderingFeaturesEXT *conditional_rendering; VkPhysicalDeviceCustomBorderColorFeaturesEXT *custom_border_color; VkPhysicalDeviceDepthClipEnableFeaturesEXT *depth_clip_enable; + VkPhysicalDeviceIndexTypeUint8FeaturesEXT *index_type_uint8; VkPhysicalDeviceLineRasterizationFeaturesEXT *line_rasterization; VkPhysicalDeviceProvokingVertexFeaturesEXT *provoking_vertex; VkPhysicalDeviceRobustness2FeaturesEXT *robustness_2; @@ -1768,12 +1777,18 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, break; /* EXT */ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: + *u.conditional_rendering = feats->conditional_rendering; + break; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: *u.custom_border_color = feats->custom_border_color; break; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: *u.depth_clip_enable = feats->depth_clip_enable; break; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT: + *u.index_type_uint8 = feats->index_type_uint8; + break; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT: *u.line_rasterization = feats->line_rasterization; break; diff --git a/src/virtio/vulkan/vn_physical_device.h b/src/virtio/vulkan/vn_physical_device.h index 1c151c8e770..166440e86bd 100644 --- a/src/virtio/vulkan/vn_physical_device.h +++ b/src/virtio/vulkan/vn_physical_device.h @@ -31,8 +31,10 @@ struct vn_physical_device_features { shader_demote_to_helper_invocation; /* EXT */ + VkPhysicalDeviceConditionalRenderingFeaturesEXT conditional_rendering; VkPhysicalDeviceCustomBorderColorFeaturesEXT custom_border_color; VkPhysicalDeviceDepthClipEnableFeaturesEXT depth_clip_enable; + VkPhysicalDeviceIndexTypeUint8FeaturesEXT index_type_uint8; VkPhysicalDeviceLineRasterizationFeaturesEXT line_rasterization; VkPhysicalDeviceProvokingVertexFeaturesEXT provoking_vertex; VkPhysicalDeviceRobustness2FeaturesEXT robustness_2;