Commit 77319190 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Pass a wined3d_device_context to wined3d_device_get_vertex_declaration().

parent 8bd4aacb
...@@ -1776,14 +1776,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers(ID3D1 ...@@ -1776,14 +1776,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers(ID3D1
static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetInputLayout(ID3D11DeviceContext1 *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetInputLayout(ID3D11DeviceContext1 *iface,
ID3D11InputLayout **input_layout) 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 wined3d_vertex_declaration *wined3d_declaration;
struct d3d_input_layout *input_layout_impl; struct d3d_input_layout *input_layout_impl;
TRACE("iface %p, input_layout %p.\n", iface, input_layout); TRACE("iface %p, input_layout %p.\n", iface, input_layout);
wined3d_mutex_lock(); 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(); wined3d_mutex_unlock();
*input_layout = NULL; *input_layout = NULL;
...@@ -5145,7 +5145,8 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetInputLayout(ID3D10Device1 *iface ...@@ -5145,7 +5145,8 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetInputLayout(ID3D10Device1 *iface
TRACE("iface %p, input_layout %p.\n", iface, input_layout); TRACE("iface %p, input_layout %p.\n", iface, input_layout);
wined3d_mutex_lock(); 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(); wined3d_mutex_unlock();
*input_layout = NULL; *input_layout = NULL;
......
...@@ -1876,11 +1876,12 @@ void CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device, ...@@ -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); 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, void CDECL wined3d_device_context_set_shader(struct wined3d_device_context *context,
......
...@@ -89,7 +89,6 @@ ...@@ -89,7 +89,6 @@
@ cdecl wined3d_device_get_swapchain(ptr long) @ cdecl wined3d_device_get_swapchain(ptr long)
@ cdecl wined3d_device_get_swapchain_count(ptr) @ cdecl wined3d_device_get_swapchain_count(ptr)
@ cdecl wined3d_device_get_unordered_access_view(ptr long) @ 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_vertex_shader(ptr)
@ cdecl wined3d_device_get_vs_resource_view(ptr long) @ cdecl wined3d_device_get_vs_resource_view(ptr long)
@ cdecl wined3d_device_get_vs_sampler(ptr long) @ cdecl wined3d_device_get_vs_sampler(ptr long)
...@@ -174,6 +173,7 @@ ...@@ -174,6 +173,7 @@
@ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_get_shader(ptr long)
@ cdecl wined3d_device_context_get_shader_resource_view(ptr long 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_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_get_viewports(ptr ptr ptr)
@ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long)
@ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long)
......
...@@ -2427,7 +2427,6 @@ struct wined3d_swapchain * __cdecl wined3d_device_get_swapchain(const struct win ...@@ -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); UINT __cdecl wined3d_device_get_swapchain_count(const struct wined3d_device *device);
struct wined3d_unordered_access_view * __cdecl wined3d_device_get_unordered_access_view( struct wined3d_unordered_access_view * __cdecl wined3d_device_get_unordered_access_view(
const struct wined3d_device *device, unsigned int idx); 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 * __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, struct wined3d_shader_resource_view * __cdecl wined3d_device_get_vs_resource_view(const struct wined3d_device *device,
UINT idx); UINT idx);
...@@ -2576,6 +2575,8 @@ struct wined3d_shader_resource_view * __cdecl wined3d_device_context_get_shader_ ...@@ -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); 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( 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); 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, void __cdecl wined3d_device_context_get_viewports(const struct wined3d_device_context *context,
unsigned int *viewport_count, struct wined3d_viewport *viewports); unsigned int *viewport_count, struct wined3d_viewport *viewports);
void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context, void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context,
......
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