mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
wined3d: Enable EXT_extended_dynamic_state.
This commit is contained in:
parent
a9c9d49a12
commit
ee620f0277
2 changed files with 17 additions and 6 deletions
|
@ -241,10 +241,11 @@ static HRESULT wined3d_select_vulkan_queue_family(const struct wined3d_adapter_v
|
|||
|
||||
struct wined3d_physical_device_info
|
||||
{
|
||||
VkPhysicalDeviceTransformFeedbackFeaturesEXT xfb_features;
|
||||
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT vertex_divisor_features;
|
||||
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT dynamic_state_features;
|
||||
VkPhysicalDeviceHostQueryResetFeatures host_query_reset_features;
|
||||
VkPhysicalDeviceShaderDrawParametersFeatures draw_parameters_features;
|
||||
VkPhysicalDeviceTransformFeedbackFeaturesEXT xfb_features;
|
||||
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT vertex_divisor_features;
|
||||
|
||||
VkPhysicalDeviceFeatures2 features2;
|
||||
};
|
||||
|
@ -338,6 +339,7 @@ static void get_physical_device_info(const struct wined3d_adapter_vk *adapter_vk
|
|||
{
|
||||
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT *vertex_divisor_features = &info->vertex_divisor_features;
|
||||
VkPhysicalDeviceShaderDrawParametersFeatures *draw_parameters_features = &info->draw_parameters_features;
|
||||
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *dynamic_state_features = &info->dynamic_state_features;
|
||||
VkPhysicalDeviceHostQueryResetFeatures *host_query_reset_features = &info->host_query_reset_features;
|
||||
VkPhysicalDeviceTransformFeedbackFeaturesEXT *xfb_features = &info->xfb_features;
|
||||
VkPhysicalDevice physical_device = adapter_vk->physical_device;
|
||||
|
@ -361,8 +363,11 @@ static void get_physical_device_info(const struct wined3d_adapter_vk *adapter_vk
|
|||
host_query_reset_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES;
|
||||
host_query_reset_features->pNext = vertex_divisor_features;
|
||||
|
||||
dynamic_state_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT;
|
||||
dynamic_state_features->pNext = host_query_reset_features;
|
||||
|
||||
features2->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
|
||||
features2->pNext = host_query_reset_features;
|
||||
features2->pNext = dynamic_state_features;
|
||||
|
||||
if (vk_info->vk_ops.vkGetPhysicalDeviceFeatures2)
|
||||
VK_CALL(vkGetPhysicalDeviceFeatures2(physical_device, features2));
|
||||
|
@ -2264,6 +2269,9 @@ static void wined3d_adapter_vk_init_d3d_info(struct wined3d_adapter_vk *adapter_
|
|||
|
||||
get_physical_device_info(adapter_vk, &device_info);
|
||||
|
||||
if (!device_info.dynamic_state_features.extendedDynamicState)
|
||||
adapter_vk->vk_info.supported[WINED3D_VK_EXT_EXTENDED_DYNAMIC_STATE] = FALSE;
|
||||
|
||||
if (!device_info.host_query_reset_features.hostQueryReset)
|
||||
adapter_vk->vk_info.supported[WINED3D_VK_EXT_HOST_QUERY_RESET] = FALSE;
|
||||
|
||||
|
@ -2357,6 +2365,8 @@ static bool wined3d_adapter_vk_init_device_extensions(struct wined3d_adapter_vk
|
|||
}
|
||||
info[] =
|
||||
{
|
||||
{VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, VK_API_VERSION_1_3},
|
||||
{VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, VK_API_VERSION_1_2},
|
||||
{VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, ~0u},
|
||||
{VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, ~0u},
|
||||
{VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, ~0u, true},
|
||||
|
@ -2365,7 +2375,6 @@ static bool wined3d_adapter_vk_init_device_extensions(struct wined3d_adapter_vk
|
|||
{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},
|
||||
{VK_KHR_SWAPCHAIN_EXTENSION_NAME, ~0u, true},
|
||||
{VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, VK_API_VERSION_1_2},
|
||||
};
|
||||
|
||||
static const struct
|
||||
|
@ -2375,12 +2384,13 @@ static bool wined3d_adapter_vk_init_device_extensions(struct wined3d_adapter_vk
|
|||
}
|
||||
map[] =
|
||||
{
|
||||
{VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, WINED3D_VK_EXT_EXTENDED_DYNAMIC_STATE},
|
||||
{VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, WINED3D_VK_EXT_HOST_QUERY_RESET},
|
||||
{VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, WINED3D_VK_EXT_SHADER_STENCIL_EXPORT},
|
||||
{VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, WINED3D_VK_EXT_TRANSFORM_FEEDBACK},
|
||||
{VK_KHR_MAINTENANCE2_EXTENSION_NAME, WINED3D_VK_KHR_MAINTENANCE2},
|
||||
{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},
|
||||
};
|
||||
|
||||
if ((vr = VK_CALL(vkEnumerateDeviceExtensionProperties(physical_device, NULL, &count, NULL))) < 0)
|
||||
|
|
|
@ -215,12 +215,13 @@ enum wined3d_vk_extension
|
|||
{
|
||||
WINED3D_VK_EXT_NONE,
|
||||
|
||||
WINED3D_VK_EXT_EXTENDED_DYNAMIC_STATE,
|
||||
WINED3D_VK_EXT_HOST_QUERY_RESET,
|
||||
WINED3D_VK_EXT_SHADER_STENCIL_EXPORT,
|
||||
WINED3D_VK_EXT_TRANSFORM_FEEDBACK,
|
||||
WINED3D_VK_KHR_MAINTENANCE2,
|
||||
WINED3D_VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE,
|
||||
WINED3D_VK_KHR_SHADER_DRAW_PARAMETERS,
|
||||
WINED3D_VK_EXT_HOST_QUERY_RESET,
|
||||
|
||||
WINED3D_VK_EXT_COUNT,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue