libs/vkd3d: Ignore draw calls when pipeline state is not set.

This commit is contained in:
Józef Kucia 2016-10-11 13:43:04 +02:00
parent a1082ec954
commit f503954a77

View File

@ -514,8 +514,7 @@ static HRESULT vkd3d_begin_command_buffer(struct d3d12_command_list *list)
list->is_recording = TRUE;
if (list->pipeline_state)
ID3D12GraphicsCommandList_SetPipelineState(&list->ID3D12GraphicsCommandList_iface, list->pipeline_state);
ID3D12GraphicsCommandList_SetPipelineState(&list->ID3D12GraphicsCommandList_iface, list->pipeline_state);
return S_OK;
}
@ -1292,6 +1291,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_DrawInstanced(ID3D12GraphicsCom
iface, vertex_count_per_instance, instance_count,
start_vertex_location, start_instance_location);
if (!list->state)
{
WARN("Pipeline state is NULL. Ignoring draw call.\n");
return;
}
vk_procs = &list->device->vk_procs;
if (!d3d12_command_list_update_current_framebuffer(list, vk_procs))