Zebediah Figura : d3d11: Use wined3d_device_context_set_index_buffer().

Alexandre Julliard julliard at winehq.org
Wed Mar 24 16:20:42 CDT 2021


Module: wine
Branch: master
Commit: 8c6cce75d31b943fbde0990cf1e8a0620ef9b335
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8c6cce75d31b943fbde0990cf1e8a0620ef9b335

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Mar 23 10:39:18 2021 -0500

d3d11: Use wined3d_device_context_set_index_buffer().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 63172472b0e..9b2652b49ec 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -686,14 +686,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IASetVertexBuffers(ID3D11D
 static void STDMETHODCALLTYPE d3d11_immediate_context_IASetIndexBuffer(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);
     struct d3d_buffer *buffer_impl = unsafe_impl_from_ID3D11Buffer(buffer);
 
     TRACE("iface %p, buffer %p, format %s, offset %u.\n",
             iface, buffer, debug_dxgi_format(format), offset);
 
     wined3d_mutex_lock();
-    wined3d_device_set_index_buffer(device->wined3d_device,
+    wined3d_device_context_set_index_buffer(context->wined3d_context,
             buffer_impl ? buffer_impl->wined3d_buffer : NULL,
             wined3dformat_from_dxgi_format(format), offset);
     wined3d_mutex_unlock();
@@ -2615,7 +2615,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon
     {
         wined3d_device_context_set_stream_source(context->wined3d_context, i, NULL, 0, 0);
     }
-    wined3d_device_set_index_buffer(device->wined3d_device, NULL, WINED3DFMT_UNKNOWN, 0);
+    wined3d_device_context_set_index_buffer(context->wined3d_context, NULL, WINED3DFMT_UNKNOWN, 0);
     wined3d_device_set_vertex_declaration(device->wined3d_device, NULL);
     wined3d_device_set_primitive_type(device->wined3d_device, WINED3D_PT_UNDEFINED, 0);
     for (i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)




More information about the wine-cvs mailing list