From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/adapter_vk.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index aa02d03b7a4..022ce005614 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -341,6 +341,14 @@ static const struct wined3d_allocator_ops wined3d_allocator_vk_ops = .allocator_destroy_chunk = wined3d_allocator_vk_destroy_chunk, };
+static void add_structure(VkPhysicalDeviceFeatures2 *features2, void *s) +{ + VkBaseOutStructure *base = s; + + base->pNext = features2->pNext; + features2->pNext = base; +} + static void get_physical_device_info(const struct wined3d_adapter_vk *adapter_vk, struct wined3d_physical_device_info *info) { VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT *vertex_divisor_features = &info->vertex_divisor_features; @@ -357,31 +365,30 @@ static void get_physical_device_info(const struct wined3d_adapter_vk *adapter_vk memset(info, 0, sizeof(*info));
draw_parameters_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; - if (vk_info->api_version >= VK_API_VERSION_1_1) - xfb_features->pNext = draw_parameters_features; + add_structure(features2, draw_parameters_features); else draw_parameters_features->shaderDrawParameters = vk_info->supported[WINED3D_VK_KHR_SHADER_DRAW_PARAMETERS];
xfb_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT; + add_structure(features2, xfb_features);
vertex_divisor_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT; - vertex_divisor_features->pNext = xfb_features; + add_structure(features2, vertex_divisor_features);
host_query_reset_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES; - host_query_reset_features->pNext = vertex_divisor_features; + add_structure(features2, host_query_reset_features);
dynamic_state3_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT; - dynamic_state3_features->pNext = host_query_reset_features; + add_structure(features2, dynamic_state3_features);
dynamic_state2_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT; - dynamic_state2_features->pNext = dynamic_state3_features; + add_structure(features2, dynamic_state2_features);
dynamic_state_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT; - dynamic_state_features->pNext = dynamic_state2_features; + add_structure(features2, dynamic_state_features);
features2->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; - features2->pNext = dynamic_state_features;
if (vk_info->vk_ops.vkGetPhysicalDeviceFeatures2) VK_CALL(vkGetPhysicalDeviceFeatures2(physical_device, features2));