Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 7 ++++--- dlls/wined3d/device.c | 7 ++++--- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index daee1b580b1..66fa1b24014 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1776,14 +1776,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetInputLayout(ID3D11DeviceContext1 *iface, ID3D11InputLayout **input_layout) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_vertex_declaration *wined3d_declaration; struct d3d_input_layout *input_layout_impl;
TRACE("iface %p, input_layout %p.\n", iface, input_layout);
wined3d_mutex_lock(); - if (!(wined3d_declaration = wined3d_device_get_vertex_declaration(device->wined3d_device))) + if (!(wined3d_declaration = wined3d_device_context_get_vertex_declaration(context->wined3d_context))) { wined3d_mutex_unlock(); *input_layout = NULL; @@ -5145,7 +5145,8 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetInputLayout(ID3D10Device1 *iface TRACE("iface %p, input_layout %p.\n", iface, input_layout);
wined3d_mutex_lock(); - if (!(wined3d_declaration = wined3d_device_get_vertex_declaration(device->wined3d_device))) + if (!(wined3d_declaration = wined3d_device_context_get_vertex_declaration( + device->immediate_context.wined3d_context))) { wined3d_mutex_unlock(); *input_layout = NULL; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index ebed57f18bd..9e74ab00081 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1876,11 +1876,12 @@ void CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device, wined3d_device_context_set_vertex_declaration(&device->cs->c, declaration); }
-struct wined3d_vertex_declaration * CDECL wined3d_device_get_vertex_declaration(const struct wined3d_device *device) +struct wined3d_vertex_declaration * CDECL wined3d_device_context_get_vertex_declaration( + const struct wined3d_device_context *context) { - TRACE("device %p.\n", device); + TRACE("context %p.\n", context);
- return device->cs->c.state->vertex_declaration; + return context->state->vertex_declaration; }
void CDECL wined3d_device_context_set_shader(struct wined3d_device_context *context, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index d0bc54d3d84..9dfeb64b180 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -89,7 +89,6 @@ @ cdecl wined3d_device_get_swapchain(ptr long) @ cdecl wined3d_device_get_swapchain_count(ptr) @ cdecl wined3d_device_get_unordered_access_view(ptr long) -@ cdecl wined3d_device_get_vertex_declaration(ptr) @ cdecl wined3d_device_get_vertex_shader(ptr) @ cdecl wined3d_device_get_vs_resource_view(ptr long) @ cdecl wined3d_device_get_vs_sampler(ptr long) @@ -174,6 +173,7 @@ @ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_get_shader_resource_view(ptr long long) @ cdecl wined3d_device_context_get_unordered_access_view(ptr long long) +@ cdecl wined3d_device_context_get_vertex_declaration(ptr) @ cdecl wined3d_device_context_get_viewports(ptr ptr ptr) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 27378608ae8..07e8ba0f540 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2427,7 +2427,6 @@ struct wined3d_swapchain * __cdecl wined3d_device_get_swapchain(const struct win UINT __cdecl wined3d_device_get_swapchain_count(const struct wined3d_device *device); struct wined3d_unordered_access_view * __cdecl wined3d_device_get_unordered_access_view( const struct wined3d_device *device, unsigned int idx); -struct wined3d_vertex_declaration * __cdecl wined3d_device_get_vertex_declaration(const struct wined3d_device *device); struct wined3d_shader * __cdecl wined3d_device_get_vertex_shader(const struct wined3d_device *device); struct wined3d_shader_resource_view * __cdecl wined3d_device_get_vs_resource_view(const struct wined3d_device *device, UINT idx); @@ -2576,6 +2575,8 @@ struct wined3d_shader_resource_view * __cdecl wined3d_device_context_get_shader_ const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx); struct wined3d_unordered_access_view * __cdecl wined3d_device_context_get_unordered_access_view( const struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int idx); +struct wined3d_vertex_declaration * __cdecl wined3d_device_context_get_vertex_declaration( + const struct wined3d_device_context *device); void __cdecl wined3d_device_context_get_viewports(const struct wined3d_device_context *context, unsigned int *viewport_count, struct wined3d_viewport *viewports); void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context,