libs/vkd3d: Implement d3d12_command_list_SetPipelineState().

This commit is contained in:
Henri Verbeet 2016-09-28 12:20:58 +02:00
parent 74fe2ec411
commit a0ccb1c581
3 changed files with 17 additions and 1 deletions

View File

@ -1295,7 +1295,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_OMSetStencilRef(ID3D12GraphicsC
static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState(ID3D12GraphicsCommandList *iface,
ID3D12PipelineState *pipeline_state)
{
FIXME("iface %p, pipeline_state %p stub!\n", iface, pipeline_state);
struct d3d12_pipeline_state *state = unsafe_impl_from_ID3D12PipelineState(pipeline_state);
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
TRACE("iface %p, pipeline_state %p.\n", iface, pipeline_state);
list->state = state;
}
static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsCommandList *iface,

View File

@ -331,6 +331,14 @@ static const struct ID3D12PipelineStateVtbl d3d12_pipeline_state_vtbl =
d3d12_pipeline_state_GetCachedBlob,
};
struct d3d12_pipeline_state *unsafe_impl_from_ID3D12PipelineState(ID3D12PipelineState *iface)
{
if (!iface)
return NULL;
assert(iface->lpVtbl == &d3d12_pipeline_state_vtbl);
return impl_from_ID3D12PipelineState(iface);
}
static HRESULT d3d12_pipeline_state_init_compute(struct d3d12_pipeline_state *state,
struct d3d12_device *device, const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc)
{

View File

@ -191,6 +191,7 @@ struct d3d12_pipeline_state
HRESULT d3d12_pipeline_state_create_compute(struct d3d12_device *device,
const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc, struct d3d12_pipeline_state **state) DECLSPEC_HIDDEN;
struct d3d12_pipeline_state *unsafe_impl_from_ID3D12PipelineState(ID3D12PipelineState *iface) DECLSPEC_HIDDEN;
/* ID3D12CommandAllocator */
struct d3d12_command_allocator
@ -236,6 +237,8 @@ struct d3d12_command_list
unsigned int fb_width;
unsigned int fb_height;
struct d3d12_pipeline_state *state;
struct d3d12_command_allocator *allocator;
struct d3d12_device *device;
};