Commit c87786b3 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Allow creating a feature level < 10 device if KHR_shader_draw_parameters is missing.

vkd3d-shader only needs it for SV_VertexID and SV_InstanceID, which are specific to shader model 4 and higher.
parent f9590687
......@@ -350,6 +350,8 @@ static void get_physical_device_info(const struct wined3d_adapter_vk *adapter_vk
if (vk_info->api_version >= VK_API_VERSION_1_1)
xfb_features->pNext = 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;
......@@ -2224,6 +2226,7 @@ static bool feature_level_10_supported(const struct wined3d_physical_device_info
&& info->features2.features.pipelineStatisticsQuery
&& info->features2.features.shaderClipDistance
&& info->features2.features.shaderCullDistance
&& info->draw_parameters_features.shaderDrawParameters
&& info->vertex_divisor_features.vertexAttributeInstanceRateDivisor
&& info->vertex_divisor_features.vertexAttributeInstanceRateZeroDivisor;
}
......@@ -2389,7 +2392,7 @@ static bool wined3d_adapter_vk_init_device_extensions(struct wined3d_adapter_vk
{VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, ~0u, true},
{VK_KHR_MAINTENANCE1_EXTENSION_NAME, VK_API_VERSION_1_1, true},
{VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,VK_API_VERSION_1_2},
{VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, VK_API_VERSION_1_1, true},
{VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, VK_API_VERSION_1_1},
{VK_KHR_SWAPCHAIN_EXTENSION_NAME, ~0u, true},
{VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, VK_API_VERSION_1_2},
};
......@@ -2403,6 +2406,7 @@ static bool wined3d_adapter_vk_init_device_extensions(struct wined3d_adapter_vk
{
{VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, WINED3D_VK_EXT_TRANSFORM_FEEDBACK},
{VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME, WINED3D_VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE},
{VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, WINED3D_VK_KHR_SHADER_DRAW_PARAMETERS},
{VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, WINED3D_VK_EXT_HOST_QUERY_RESET},
};
......
......@@ -217,6 +217,7 @@ enum wined3d_vk_extension
WINED3D_VK_EXT_TRANSFORM_FEEDBACK,
WINED3D_VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE,
WINED3D_VK_KHR_SHADER_DRAW_PARAMETERS,
WINED3D_VK_EXT_HOST_QUERY_RESET,
WINED3D_VK_EXT_COUNT,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment