wined3d: Pass a wined3d_device_context to wined3d_device_get_stream_source().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-04-20 19:53:54 -05:00 committed by Alexandre Julliard
parent 6d04e6c3a9
commit 4d459f4395
4 changed files with 11 additions and 11 deletions

View File

@ -1799,7 +1799,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetInputLayout(ID3D11Dev
static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetVertexBuffers(ID3D11DeviceContext1 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *strides, UINT *offsets)
{
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p.\n",
@ -1811,7 +1811,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetVertexBuffers(ID3D11D
struct wined3d_buffer *wined3d_buffer = NULL;
struct d3d_buffer *buffer_impl;
if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, start_slot + i,
if (FAILED(wined3d_device_context_get_stream_source(context->wined3d_context, start_slot + i,
&wined3d_buffer, &offsets[i], &strides[i])))
{
FIXME("Failed to get vertex buffer %u.\n", start_slot + i);
@ -5174,7 +5174,7 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetVertexBuffers(ID3D10Device1 *ifa
struct wined3d_buffer *wined3d_buffer = NULL;
struct d3d_buffer *buffer_impl;
if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, start_slot + i,
if (FAILED(wined3d_device_context_get_stream_source(device->immediate_context.wined3d_context, start_slot + i,
&wined3d_buffer, &offsets[i], &strides[i])))
ERR("Failed to get vertex buffer.\n");

View File

@ -1254,13 +1254,13 @@ HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UI
return wined3d_device_context_set_stream_source(&device->cs->c, stream_idx, buffer, offset, stride);
}
HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *device,
UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride)
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)
{
const struct wined3d_stream_state *stream;
TRACE("device %p, stream_idx %u, buffer %p, offset %p, stride %p.\n",
device, stream_idx, buffer, offset, stride);
TRACE("context %p, stream_idx %u, buffer %p, offset %p, stride %p.\n",
context, stream_idx, buffer, offset, stride);
if (stream_idx >= WINED3D_MAX_STREAMS)
{
@ -1268,7 +1268,7 @@ HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *devi
return WINED3DERR_INVALIDCALL;
}
stream = &device->cs->c.state->streams[stream_idx];
stream = &context->state->streams[stream_idx];
*buffer = stream->buffer;
if (offset)
*offset = stream->offset;

View File

@ -85,7 +85,6 @@
@ 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_stream_source(ptr long ptr ptr ptr)
@ cdecl wined3d_device_get_swapchain(ptr long)
@ cdecl wined3d_device_get_swapchain_count(ptr)
@ cdecl wined3d_device_get_unordered_access_view(ptr long)
@ -172,6 +171,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_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)
@ cdecl wined3d_device_context_get_viewports(ptr ptr ptr)

View File

@ -2420,8 +2420,6 @@ BOOL __cdecl wined3d_device_get_software_vertex_processing(const struct wined3d_
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);
HRESULT __cdecl wined3d_device_get_stream_source(const struct wined3d_device *device,
UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride);
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);
@ -2573,6 +2571,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);
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(
const struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int idx);
struct wined3d_vertex_declaration * __cdecl wined3d_device_context_get_vertex_declaration(