+ VkPhysicalDeviceFeatures2 feats = {};
+ VkPhysicalDeviceTransformFeedbackFeaturesEXT tf_feats = {};
+ VkPhysicalDeviceConditionalRenderingFeaturesEXT cond_render_feats = {};
+ VkPhysicalDeviceIndexTypeUint8FeaturesEXT index_uint8_feats = {};
+
+ feats.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
+ if (have_tf_ext) {
+ tf_feats.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT;
+ tf_feats.pNext = feats.pNext;
+ feats.pNext = &tf_feats;
+ }
+ if (have_cond_render_ext) {
+ cond_render_feats.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT;
+ cond_render_feats.pNext = feats.pNext;
+ feats.pNext = &cond_render_feats;
+ }
+ if (have_EXT_index_type_uint8) {
+ index_uint8_feats.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT;
+ index_uint8_feats.pNext = feats.pNext;
+ feats.pNext = &index_uint8_feats;
+ }
+ vkGetPhysicalDeviceFeatures2(screen->pdev, &feats);
+ memcpy(&screen->feats, &feats.features, sizeof(screen->feats));
+ if (have_tf_ext && tf_feats.transformFeedback)
+ screen->have_EXT_transform_feedback = true;
+ if (have_cond_render_ext && cond_render_feats.conditionalRendering)
+ screen->have_EXT_conditional_rendering = true;
+ if (have_EXT_index_type_uint8 && index_uint8_feats.indexTypeUint8)
+ screen->have_EXT_index_type_uint8 = true;
+
+ VkPhysicalDeviceProperties2 props = {};
+ props.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
+ if (screen->have_EXT_transform_feedback) {
+ screen->tf_props.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT;
+ screen->tf_props.pNext = NULL;
+ props.pNext = &screen->tf_props;
+ }
+ vkGetPhysicalDeviceProperties2(screen->pdev, &props);
+ memcpy(&screen->props, &props.properties, sizeof(screen->props));