=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d11: Implement d3d11_immediate_context_IASetInputLayout().
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Oct 15 10:27:59 CDT 2015
Module: wine
Branch: master
Commit: 5ff257f226361ae7c11f122a227da408c9516f7a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5ff257f226361ae7c11f122a227da408c9516f7a
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Wed Oct 14 02:08:12 2015 +0200
d3d11: Implement d3d11_immediate_context_IASetInputLayout().
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d11/d3d11_private.h | 1 +
dlls/d3d11/device.c | 9 ++++++++-
dlls/d3d11/inputlayout.c | 9 +++++++++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h
index 02fa1dc..956ebf0 100644
--- a/dlls/d3d11/d3d11_private.h
+++ b/dlls/d3d11/d3d11_private.h
@@ -222,6 +222,7 @@ HRESULT d3d_input_layout_create(struct d3d_device *device,
const D3D11_INPUT_ELEMENT_DESC *element_descs, UINT element_count,
const void *shader_byte_code, SIZE_T shader_byte_code_length,
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;
/* ID3D11VertexShader, ID3D10VertexShader */
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index a06f3e6..71ed27c 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -202,7 +202,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers(ID3D1
static void STDMETHODCALLTYPE d3d11_immediate_context_IASetInputLayout(ID3D11DeviceContext *iface,
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,
diff --git a/dlls/d3d11/inputlayout.c b/dlls/d3d11/inputlayout.c
index bb98d30..d481dd2 100644
--- a/dlls/d3d11/inputlayout.c
+++ b/dlls/d3d11/inputlayout.c
@@ -379,6 +379,15 @@ HRESULT d3d_input_layout_create(struct d3d_device *device,
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)
{
if (!iface)
More information about the wine-cvs
mailing list