mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
libs/vkd3d: Implement d3d12_command_list_IASetPrimitiveTopology().
This commit is contained in:
@ -1207,10 +1207,34 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresource(ID3D12Graphi
|
|||||||
iface, dst_resource, dst_sub_resource, src_resource, src_sub_resource, format);
|
iface, dst_resource, dst_sub_resource, src_resource, src_sub_resource, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12GraphicsCommandList *iface,
|
static enum VkPrimitiveTopology vk_topology_from_d3d12_topology(D3D12_PRIMITIVE_TOPOLOGY topology)
|
||||||
D3D12_PRIMITIVE_TOPOLOGY primitive_topology)
|
|
||||||
{
|
{
|
||||||
FIXME("iface %p, primitive_topology %#x stub!\n", iface, primitive_topology);
|
switch (topology)
|
||||||
|
{
|
||||||
|
case D3D_PRIMITIVE_TOPOLOGY_POINTLIST:
|
||||||
|
return VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
|
||||||
|
case D3D_PRIMITIVE_TOPOLOGY_LINELIST:
|
||||||
|
return VK_PRIMITIVE_TOPOLOGY_LINE_LIST;
|
||||||
|
case D3D_PRIMITIVE_TOPOLOGY_LINESTRIP:
|
||||||
|
return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
|
||||||
|
case D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST:
|
||||||
|
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||||
|
case D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP:
|
||||||
|
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
|
||||||
|
default:
|
||||||
|
FIXME("Unhandled primitive topology %#x.\n", topology);
|
||||||
|
return VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12GraphicsCommandList *iface,
|
||||||
|
D3D12_PRIMITIVE_TOPOLOGY topology)
|
||||||
|
{
|
||||||
|
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
||||||
|
|
||||||
|
TRACE("iface %p, topology %#x.\n", iface, topology);
|
||||||
|
|
||||||
|
list->ia_desc.topology = vk_topology_from_d3d12_topology(topology);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCommandList *iface,
|
static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCommandList *iface,
|
||||||
@ -1715,6 +1739,12 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d
|
|||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list->ia_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
|
||||||
|
list->ia_desc.pNext = NULL;
|
||||||
|
list->ia_desc.flags = 0;
|
||||||
|
list->ia_desc.topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
|
||||||
|
list->ia_desc.primitiveRestartEnable = VK_FALSE;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +229,8 @@ struct d3d12_command_list
|
|||||||
VkCommandBuffer vk_command_buffer;
|
VkCommandBuffer vk_command_buffer;
|
||||||
BOOL is_recording;
|
BOOL is_recording;
|
||||||
|
|
||||||
|
struct VkPipelineInputAssemblyStateCreateInfo ia_desc;
|
||||||
|
|
||||||
struct d3d12_command_allocator *allocator;
|
struct d3d12_command_allocator *allocator;
|
||||||
struct d3d12_device *device;
|
struct d3d12_device *device;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user