[PATCH 3/6] d3d11: Partially implement d3d11_immediate_context_VSSetShader().
Józef Kucia
jkucia at codeweavers.com
Tue Oct 13 19:08:13 CDT 2015
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/d3d11/d3d11_private.h | 1 +
dlls/d3d11/device.c | 12 +++++++++++-
dlls/d3d11/shader.c | 9 +++++++++
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h
index 956ebf0..cd8a336 100644
--- a/dlls/d3d11/d3d11_private.h
+++ b/dlls/d3d11/d3d11_private.h
@@ -239,6 +239,7 @@ struct d3d_vertex_shader
HRESULT d3d_vertex_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length,
struct d3d_vertex_shader **shader) DECLSPEC_HIDDEN;
+struct d3d_vertex_shader *unsafe_impl_from_ID3D11VertexShader(ID3D11VertexShader *iface) DECLSPEC_HIDDEN;
struct d3d_vertex_shader *unsafe_impl_from_ID3D10VertexShader(ID3D10VertexShader *iface) DECLSPEC_HIDDEN;
/* ID3D11GeometryShader, ID3D10GeometryShader */
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 71ed27c..9736d96 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -159,8 +159,18 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetSamplers(ID3D11Device
static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShader(ID3D11DeviceContext *iface,
ID3D11VertexShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
{
- FIXME("iface %p, shader %p, class_instances %p, class_instance_count %u stub!\n",
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
+ struct d3d_vertex_shader *vs = unsafe_impl_from_ID3D11VertexShader(shader);
+
+ TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
iface, shader, class_instances, class_instance_count);
+
+ if (class_instances)
+ FIXME("Dynamic linking is not implemented yet.\n");
+
+ wined3d_mutex_lock();
+ wined3d_device_set_vertex_shader(device->wined3d_device, vs ? vs->wined3d_shader : NULL);
+ wined3d_mutex_unlock();
}
static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexed(ID3D11DeviceContext *iface,
diff --git a/dlls/d3d11/shader.c b/dlls/d3d11/shader.c
index 27083de..3778443 100644
--- a/dlls/d3d11/shader.c
+++ b/dlls/d3d11/shader.c
@@ -430,6 +430,15 @@ HRESULT d3d_vertex_shader_create(struct d3d_device *device, const void *byte_cod
return S_OK;
}
+struct d3d_vertex_shader *unsafe_impl_from_ID3D11VertexShader(ID3D11VertexShader *iface)
+{
+ if (!iface)
+ return NULL;
+ assert(iface->lpVtbl == &d3d11_vertex_shader_vtbl);
+
+ return impl_from_ID3D11VertexShader(iface);
+}
+
struct d3d_vertex_shader *unsafe_impl_from_ID3D10VertexShader(ID3D10VertexShader *iface)
{
if (!iface)
--
2.4.9
More information about the wine-patches
mailing list