mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d: Handle D3D_PRIMITIVE_TOPOLOGY_UNDEFINED.
Bundles need to set an undefined topology to match D3D12 behaviour. Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2ed344a5f0
commit
471b8e2206
@ -3660,12 +3660,6 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12Gr
|
||||
|
||||
TRACE("iface %p, topology %#x.\n", iface, topology);
|
||||
|
||||
if (topology == D3D_PRIMITIVE_TOPOLOGY_UNDEFINED)
|
||||
{
|
||||
WARN("Ignoring D3D_PRIMITIVE_TOPOLOGY_UNDEFINED.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (list->primitive_topology == topology)
|
||||
return;
|
||||
|
||||
|
@ -2754,6 +2754,8 @@ static enum VkPrimitiveTopology vk_topology_from_d3d12_topology(D3D12_PRIMITIVE_
|
||||
case D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST:
|
||||
case D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST:
|
||||
return VK_PRIMITIVE_TOPOLOGY_PATCH_LIST;
|
||||
case D3D_PRIMITIVE_TOPOLOGY_UNDEFINED:
|
||||
return VK_PRIMITIVE_TOPOLOGY_MAX_ENUM;
|
||||
default:
|
||||
FIXME("Unhandled primitive topology %#x.\n", topology);
|
||||
return VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
|
||||
@ -2938,6 +2940,12 @@ VkPipeline d3d12_pipeline_state_get_or_create_pipeline(struct d3d12_pipeline_sta
|
||||
ia_desc.topology = vk_topology_from_d3d12_topology(topology);
|
||||
ia_desc.primitiveRestartEnable = !!graphics->index_buffer_strip_cut_value;
|
||||
|
||||
if (ia_desc.topology == VK_PRIMITIVE_TOPOLOGY_MAX_ENUM)
|
||||
{
|
||||
WARN("Primitive topology is undefined.\n");
|
||||
return VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
tessellation_info.sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO;
|
||||
tessellation_info.pNext = NULL;
|
||||
tessellation_info.flags = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user