diff --git a/include/dxgibase.h b/include/dxgibase.h index 238fc25c..fff0a402 100644 --- a/include/dxgibase.h +++ b/include/dxgibase.h @@ -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, diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 4d705d15..e141c765 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -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,