[PATCH 1/4] wined3d: Pass a wined3d_device_context to wined3d_device_get_stream_source().
Zebediah Figura
z.figura12 at gmail.com
Tue Apr 20 19:53:54 CDT 2021
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/d3d11/device.c | 6 +++---
dlls/wined3d/device.c | 10 +++++-----
dlls/wined3d/wined3d.spec | 2 +-
include/wine/wined3d.h | 4 ++--
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 66fa1b24014..2b923d65d23 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -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");
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 9e74ab00081..711ca0fe735 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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;
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 9dfeb64b180..a66adbd12d8 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -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)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 07e8ba0f540..41c578971f5 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -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(
--
2.30.2
More information about the wine-devel
mailing list