Bundles need to set an undefined topology to match D3D12 behaviour.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- libs/vkd3d/command.c | 6 ------ libs/vkd3d/state.c | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 46c0c3a5..9f4a4149 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -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;
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 58463e59..4eccf1e3 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -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;