wined3d: Implement primitive restart for the Vulkan adapter.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Henri Verbeet 2020-05-20 18:12:31 +04:30 committed by Alexandre Julliard
parent 5bd5244ba4
commit 99f4f16b92
2 changed files with 12 additions and 0 deletions

View File

@ -1745,6 +1745,8 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte
if (key->ia_desc.topology != vk_topology)
{
key->ia_desc.topology = vk_topology;
key->ia_desc.primitiveRestartEnable = !(d3d_info->wined3d_creation_flags & WINED3D_NO_PRIMITIVE_RESTART)
&& !wined3d_primitive_type_is_list(state->primitive_type);
update = true;
}

View File

@ -5949,6 +5949,16 @@ static inline VkImageAspectFlags vk_aspect_mask_from_format(const struct wined3d
return mask;
}
static inline bool wined3d_primitive_type_is_list(enum wined3d_primitive_type t)
{
return t == WINED3D_PT_POINTLIST
|| t == WINED3D_PT_LINELIST
|| t == WINED3D_PT_TRIANGLELIST
|| t == WINED3D_PT_LINELIST_ADJ
|| t == WINED3D_PT_TRIANGLELIST_ADJ
|| t == WINED3D_PT_PATCH;
}
/* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */
#define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL"