mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d: Implement d3d12_command_list_IASetIndexBuffer().
This commit is contained in:
parent
2213e126cf
commit
9bb9e63f23
@ -47,6 +47,9 @@ typedef enum DXGI_FORMAT
|
||||
|
||||
DXGI_FORMAT_D32_FLOAT = 0x28,
|
||||
DXGI_FORMAT_R32_FLOAT = 0x29,
|
||||
DXGI_FORMAT_R32_UINT = 0x2a,
|
||||
|
||||
DXGI_FORMAT_R16_UINT = 0x39,
|
||||
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM = 0x57,
|
||||
DXGI_FORMAT_B8G8R8X8_UNORM = 0x58,
|
||||
|
@ -2102,7 +2102,28 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootUnorderedAccessV
|
||||
static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12GraphicsCommandList *iface,
|
||||
const D3D12_INDEX_BUFFER_VIEW *view)
|
||||
{
|
||||
FIXME("iface %p, view %p stub!\n", iface, view);
|
||||
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
||||
const struct vkd3d_vk_device_procs *vk_procs;
|
||||
enum VkIndexType index_type;
|
||||
|
||||
TRACE("iface %p, view %p.\n", iface, view);
|
||||
|
||||
vk_procs = &list->device->vk_procs;
|
||||
|
||||
switch (view->Format)
|
||||
{
|
||||
case DXGI_FORMAT_R16_UINT:
|
||||
index_type = VK_INDEX_TYPE_UINT16;
|
||||
break;
|
||||
case DXGI_FORMAT_R32_UINT:
|
||||
index_type = VK_INDEX_TYPE_UINT32;
|
||||
break;
|
||||
default:
|
||||
FIXME("Unhandled format %#x.\n", view->Format);
|
||||
return;
|
||||
}
|
||||
|
||||
VK_CALL(vkCmdBindIndexBuffer(list->vk_command_buffer, (VkBuffer)view->BufferLocation, 0, index_type));
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12GraphicsCommandList *iface,
|
||||
|
Loading…
Reference in New Issue
Block a user