mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
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)
This commit is contained in:
parent
cfae1ceb04
commit
f959068788
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue