mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Avoid invalidating graphics pipeline and framebuffer.
Do not invalidate the current graphics pipeline and the current framebuffer when a compute pipeline is bound. 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
b500207b79
commit
35748f9228
@ -2839,15 +2839,18 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState(ID3D12Graphics
|
||||
TRACE("iface %p, pipeline_state %p.\n", iface, pipeline_state);
|
||||
|
||||
list->state = state;
|
||||
d3d12_command_list_invalidate_current_framebuffer(list);
|
||||
d3d12_command_list_invalidate_current_pipeline(list);
|
||||
d3d12_command_list_invalidate_bindings(list, state);
|
||||
|
||||
if (state && state->vk_bind_point == VK_PIPELINE_BIND_POINT_COMPUTE)
|
||||
if (d3d12_pipeline_state_is_compute(state))
|
||||
{
|
||||
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
||||
VK_CALL(vkCmdBindPipeline(list->vk_command_buffer, state->vk_bind_point, state->u.compute.vk_pipeline));
|
||||
}
|
||||
else
|
||||
{
|
||||
d3d12_command_list_invalidate_current_framebuffer(list);
|
||||
d3d12_command_list_invalidate_current_pipeline(list);
|
||||
}
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsCommandList *iface,
|
||||
|
@ -516,6 +516,11 @@ struct d3d12_pipeline_state
|
||||
struct d3d12_device *device;
|
||||
};
|
||||
|
||||
static inline bool d3d12_pipeline_state_is_compute(const struct d3d12_pipeline_state *state)
|
||||
{
|
||||
return state && state->vk_bind_point == VK_PIPELINE_BIND_POINT_COMPUTE;
|
||||
}
|
||||
|
||||
HRESULT d3d12_pipeline_state_create_compute(struct d3d12_device *device,
|
||||
const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc, struct d3d12_pipeline_state **state) DECLSPEC_HIDDEN;
|
||||
HRESULT d3d12_pipeline_state_create_graphics(struct d3d12_device *device,
|
||||
|
Loading…
Reference in New Issue
Block a user