Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 7 ++++--- dlls/wined3d/device.c | 10 +++++----- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 2b923d65d23..f1361f306ff 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2190,7 +2190,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3 static void STDMETHODCALLTYPE d3d11_immediate_context_SOGetTargets(ID3D11DeviceContext1 *iface, UINT buffer_count, ID3D11Buffer **buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i;
TRACE("iface %p, buffer_count %u, buffers %p.\n", iface, buffer_count, buffers); @@ -2201,7 +2201,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_SOGetTargets(ID3D11DeviceC struct wined3d_buffer *wined3d_buffer; struct d3d_buffer *buffer_impl;
- if (!(wined3d_buffer = wined3d_device_get_stream_output(device->wined3d_device, i, NULL))) + if (!(wined3d_buffer = wined3d_device_context_get_stream_output(context->wined3d_context, i, NULL))) { buffers[i] = NULL; continue; @@ -5501,7 +5501,8 @@ static void STDMETHODCALLTYPE d3d10_device_SOGetTargets(ID3D10Device1 *iface, struct wined3d_buffer *wined3d_buffer; struct d3d_buffer *buffer_impl;
- if (!(wined3d_buffer = wined3d_device_get_stream_output(device->wined3d_device, i, &offsets[i]))) + if (!(wined3d_buffer = wined3d_device_context_get_stream_output( + device->immediate_context.wined3d_context, i, &offsets[i]))) { buffers[i] = NULL; continue; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 711ca0fe735..19ab5b1e52a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1229,10 +1229,10 @@ void CDECL wined3d_device_set_stream_output(struct wined3d_device *device, UINT wined3d_device_context_set_stream_output(&device->cs->c, idx, buffer, offset); }
-struct wined3d_buffer * CDECL wined3d_device_get_stream_output(struct wined3d_device *device, - UINT idx, UINT *offset) +struct wined3d_buffer * CDECL wined3d_device_context_get_stream_output(struct wined3d_device_context *context, + unsigned int idx, unsigned int *offset) { - TRACE("device %p, idx %u, offset %p.\n", device, idx, offset); + TRACE("context %p, idx %u, offset %p.\n", context, idx, offset);
if (idx >= WINED3D_MAX_STREAM_OUTPUT_BUFFERS) { @@ -1241,8 +1241,8 @@ struct wined3d_buffer * CDECL wined3d_device_get_stream_output(struct wined3d_de }
if (offset) - *offset = device->cs->c.state->stream_output[idx].offset; - return device->cs->c.state->stream_output[idx].buffer; + *offset = context->state->stream_output[idx].offset; + return context->state->stream_output[idx].buffer; }
HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index a66adbd12d8..aae9474c03a 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -84,7 +84,6 @@ @ cdecl wined3d_device_get_render_state(ptr long) @ cdecl wined3d_device_get_software_vertex_processing(ptr) @ cdecl wined3d_device_get_state(ptr) -@ cdecl wined3d_device_get_stream_output(ptr long ptr) @ cdecl wined3d_device_get_swapchain(ptr long) @ cdecl wined3d_device_get_swapchain_count(ptr) @ cdecl wined3d_device_get_unordered_access_view(ptr long) @@ -171,6 +170,7 @@ @ cdecl wined3d_device_context_get_scissor_rects(ptr ptr ptr) @ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_get_shader_resource_view(ptr long long) +@ cdecl wined3d_device_context_get_stream_output(ptr long ptr) @ cdecl wined3d_device_context_get_stream_source(ptr long ptr ptr ptr) @ cdecl wined3d_device_context_get_unordered_access_view(ptr long long) @ cdecl wined3d_device_context_get_vertex_declaration(ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 41c578971f5..657f8cd6758 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2418,8 +2418,6 @@ HRESULT __cdecl wined3d_device_get_raster_status(const struct wined3d_device *de DWORD __cdecl wined3d_device_get_render_state(const struct wined3d_device *device, enum wined3d_render_state state); BOOL __cdecl wined3d_device_get_software_vertex_processing(const struct wined3d_device *device); struct wined3d_state * __cdecl wined3d_device_get_state(struct wined3d_device *device); -struct wined3d_buffer * __cdecl wined3d_device_get_stream_output(struct wined3d_device *device, - UINT idx, UINT *offset); struct wined3d_swapchain * __cdecl wined3d_device_get_swapchain(const struct wined3d_device *device, UINT swapchain_idx); UINT __cdecl wined3d_device_get_swapchain_count(const struct wined3d_device *device); @@ -2571,6 +2569,8 @@ struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct w enum wined3d_shader_type type); struct wined3d_shader_resource_view * __cdecl wined3d_device_context_get_shader_resource_view( const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx); +struct wined3d_buffer * __cdecl wined3d_device_context_get_stream_output(struct wined3d_device_context *context, + unsigned int idx, unsigned int *offset); HRESULT __cdecl wined3d_device_context_get_stream_source(const struct wined3d_device_context *context, unsigned int stream_idx, struct wined3d_buffer **buffer, unsigned int *offset, unsigned int *stride); struct wined3d_unordered_access_view * __cdecl wined3d_device_context_get_unordered_access_view(