mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Do not crash on NULL views in IASetIndexBuffers().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a844d8f0a8
commit
d0f8443ac5
@ -3583,6 +3583,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12Graphics
|
||||
|
||||
TRACE("iface %p, view %p.\n", iface, view);
|
||||
|
||||
if (!view)
|
||||
{
|
||||
WARN("Ignoring NULL index buffer view.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
vk_procs = &list->device->vk_procs;
|
||||
|
||||
switch (view->Format)
|
||||
|
@ -4492,6 +4492,7 @@ static void test_draw_indexed_instanced(void)
|
||||
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
|
||||
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
|
||||
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||
ID3D12GraphicsCommandList_IASetIndexBuffer(command_list, NULL);
|
||||
ID3D12GraphicsCommandList_IASetIndexBuffer(command_list, &ibv);
|
||||
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
|
||||
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
|
||||
|
Loading…
Reference in New Issue
Block a user