Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 7 ++++--- dlls/wined3d/device.c | 6 +++--- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 0226d26047d..daee1b580b1 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1836,7 +1836,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetVertexBuffers(ID3D11D static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetIndexBuffer(ID3D11DeviceContext1 *iface, ID3D11Buffer **buffer, DXGI_FORMAT *format, UINT *offset) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); enum wined3d_format_id wined3d_format; struct wined3d_buffer *wined3d_buffer; struct d3d_buffer *buffer_impl; @@ -1844,7 +1844,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetIndexBuffer(ID3D11Dev TRACE("iface %p, buffer %p, format %p, offset %p.\n", iface, buffer, format, offset);
wined3d_mutex_lock(); - wined3d_buffer = wined3d_device_get_index_buffer(device->wined3d_device, &wined3d_format, offset); + wined3d_buffer = wined3d_device_context_get_index_buffer(context->wined3d_context, &wined3d_format, offset); *format = dxgi_format_from_wined3dformat(wined3d_format); if (!wined3d_buffer) { @@ -5201,7 +5201,8 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetIndexBuffer(ID3D10Device1 *iface TRACE("iface %p, buffer %p, format %p, offset %p.\n", iface, buffer, format, offset);
wined3d_mutex_lock(); - wined3d_buffer = wined3d_device_get_index_buffer(device->wined3d_device, &wined3d_format, offset); + wined3d_buffer = wined3d_device_context_get_index_buffer( + device->immediate_context.wined3d_context, &wined3d_format, offset); *format = dxgi_format_from_wined3dformat(wined3d_format); if (!wined3d_buffer) { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3461c099a5c..ebed57f18bd 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1524,12 +1524,12 @@ void CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, wined3d_device_context_set_index_buffer(&device->cs->c, buffer, format_id, offset); }
-struct wined3d_buffer * CDECL wined3d_device_get_index_buffer(const struct wined3d_device *device, +struct wined3d_buffer * CDECL wined3d_device_context_get_index_buffer(const struct wined3d_device_context *context, enum wined3d_format_id *format, unsigned int *offset) { - const struct wined3d_state *state = device->cs->c.state; + const struct wined3d_state *state = context->state;
- TRACE("device %p, format %p, offset %p.\n", device, format, offset); + TRACE("context %p, format %p, offset %p.\n", context, format, offset);
*format = state->index_format; if (offset) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index b008d192b8f..d0bc54d3d84 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -74,7 +74,6 @@ @ cdecl wined3d_device_get_hs_sampler(ptr long) @ cdecl wined3d_device_get_hull_shader(ptr) @ cdecl wined3d_device_get_immediate_context(ptr) -@ cdecl wined3d_device_get_index_buffer(ptr ptr ptr) @ cdecl wined3d_device_get_max_frame_latency(ptr) @ cdecl wined3d_device_get_npatch_mode(ptr) @ cdecl wined3d_device_get_pixel_shader(ptr) @@ -166,6 +165,7 @@ @ cdecl wined3d_device_context_get_constant_buffer(ptr long long) @ cdecl wined3d_device_context_get_depth_stencil_state(ptr ptr) @ cdecl wined3d_device_context_get_depth_stencil_view(ptr) +@ cdecl wined3d_device_context_get_index_buffer(ptr ptr ptr) @ cdecl wined3d_device_context_get_predication(ptr ptr) @ cdecl wined3d_device_context_get_rasterizer_state(ptr) @ cdecl wined3d_device_context_get_rendertarget_view(ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index bc26e794582..27378608ae8 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2405,8 +2405,6 @@ struct wined3d_shader_resource_view * __cdecl wined3d_device_get_hs_resource_vie struct wined3d_sampler * __cdecl wined3d_device_get_hs_sampler(const struct wined3d_device *device, unsigned int idx); struct wined3d_shader * __cdecl wined3d_device_get_hull_shader(const struct wined3d_device *device); struct wined3d_device_context * __cdecl wined3d_device_get_immediate_context(struct wined3d_device *device); -struct wined3d_buffer * __cdecl wined3d_device_get_index_buffer(const struct wined3d_device *device, - enum wined3d_format_id *format, unsigned int *offset); unsigned int __cdecl wined3d_device_get_max_frame_latency(const struct wined3d_device *device); float __cdecl wined3d_device_get_npatch_mode(const struct wined3d_device *device); struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(const struct wined3d_device *device); @@ -2560,6 +2558,8 @@ struct wined3d_buffer * __cdecl wined3d_device_context_get_constant_buffer(const enum wined3d_shader_type shader_type, unsigned int idx); struct wined3d_depth_stencil_state * __cdecl wined3d_device_context_get_depth_stencil_state( const struct wined3d_device_context *context, unsigned int *stencil_ref); +struct wined3d_buffer * __cdecl wined3d_device_context_get_index_buffer(const struct wined3d_device_context *context, + enum wined3d_format_id *format, unsigned int *offset); struct wined3d_query * __cdecl wined3d_device_context_get_predication(struct wined3d_device_context *context, BOOL *value); struct wined3d_rasterizer_state * __cdecl wined3d_device_context_get_rasterizer_state(