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

wined3d: Enable shaderDrawParameters on Vulkan 1.1 if supported.

This fixes a validation error: [ VUID-VkShaderModuleCreateInfo-pCode-01091 ] Object 0: handle = 0x7fbdb300, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xa7bb8db6 | vkCreateShaderModule(): The SPIR-V Capability (DrawParameters) was declared, but none of the requirements were met to use it. The Vulkan spec states: If pCode declares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01091)
parent cfae1ceb
......@@ -244,6 +244,7 @@ struct wined3d_physical_device_info
VkPhysicalDeviceTransformFeedbackFeaturesEXT xfb_features;
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT vertex_divisor_features;
VkPhysicalDeviceHostQueryResetFeatures host_query_reset_features;
VkPhysicalDeviceShaderDrawParametersFeatures draw_parameters_features;
VkPhysicalDeviceFeatures2 features2;
};
......@@ -336,6 +337,7 @@ static const struct wined3d_allocator_ops wined3d_allocator_vk_ops =
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;
VkPhysicalDeviceShaderDrawParametersFeatures *draw_parameters_features = &info->draw_parameters_features;
VkPhysicalDeviceHostQueryResetFeatures *host_query_reset_features = &info->host_query_reset_features;
VkPhysicalDeviceTransformFeedbackFeaturesEXT *xfb_features = &info->xfb_features;
VkPhysicalDevice physical_device = adapter_vk->physical_device;
......@@ -344,6 +346,11 @@ 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;
xfb_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT;
vertex_divisor_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT;
......
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