Commit 5ff257f2 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Implement d3d11_immediate_context_IASetInputLayout().

parent 6d984251
...@@ -222,6 +222,7 @@ HRESULT d3d_input_layout_create(struct d3d_device *device, ...@@ -222,6 +222,7 @@ HRESULT d3d_input_layout_create(struct d3d_device *device,
const D3D11_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const D3D11_INPUT_ELEMENT_DESC *element_descs, UINT element_count,
const void *shader_byte_code, SIZE_T shader_byte_code_length, const void *shader_byte_code, SIZE_T shader_byte_code_length,
struct d3d_input_layout **layout) DECLSPEC_HIDDEN; struct d3d_input_layout **layout) DECLSPEC_HIDDEN;
struct d3d_input_layout *unsafe_impl_from_ID3D11InputLayout(ID3D11InputLayout *iface) DECLSPEC_HIDDEN;
struct d3d_input_layout *unsafe_impl_from_ID3D10InputLayout(ID3D10InputLayout *iface) DECLSPEC_HIDDEN; struct d3d_input_layout *unsafe_impl_from_ID3D10InputLayout(ID3D10InputLayout *iface) DECLSPEC_HIDDEN;
/* ID3D11VertexShader, ID3D10VertexShader */ /* ID3D11VertexShader, ID3D10VertexShader */
......
...@@ -202,7 +202,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers(ID3D1 ...@@ -202,7 +202,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers(ID3D1
static void STDMETHODCALLTYPE d3d11_immediate_context_IASetInputLayout(ID3D11DeviceContext *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_IASetInputLayout(ID3D11DeviceContext *iface,
ID3D11InputLayout *input_layout) ID3D11InputLayout *input_layout)
{ {
FIXME("iface %p, input_layout %p stub!\n", iface, input_layout); struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
struct d3d_input_layout *layout = unsafe_impl_from_ID3D11InputLayout(input_layout);
TRACE("iface %p, input_layout %p.\n", iface, input_layout);
wined3d_mutex_lock();
wined3d_device_set_vertex_declaration(device->wined3d_device, layout ? layout->wined3d_decl : NULL);
wined3d_mutex_unlock();
} }
static void STDMETHODCALLTYPE d3d11_immediate_context_IASetVertexBuffers(ID3D11DeviceContext *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_IASetVertexBuffers(ID3D11DeviceContext *iface,
......
...@@ -379,6 +379,15 @@ HRESULT d3d_input_layout_create(struct d3d_device *device, ...@@ -379,6 +379,15 @@ HRESULT d3d_input_layout_create(struct d3d_device *device,
return S_OK; return S_OK;
} }
struct d3d_input_layout *unsafe_impl_from_ID3D11InputLayout(ID3D11InputLayout *iface)
{
if (!iface)
return NULL;
assert(iface->lpVtbl == &d3d11_input_layout_vtbl);
return impl_from_ID3D11InputLayout(iface);
}
struct d3d_input_layout *unsafe_impl_from_ID3D10InputLayout(ID3D10InputLayout *iface) struct d3d_input_layout *unsafe_impl_from_ID3D10InputLayout(ID3D10InputLayout *iface)
{ {
if (!iface) if (!iface)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment