From eb4792a9af952f540602413b07b857bb0960b6f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Tue, 9 May 2017 12:51:38 +0200 Subject: [PATCH] d3d11: Handle unsupported vertex buffer slots in better way. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit D3D11 supports 32 buffers. Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d11/device.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 69642efbc3f..84a878c955f 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1583,12 +1583,18 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetVertexBuffers(ID3D11D wined3d_mutex_lock(); for (i = 0; i < buffer_count; ++i) { - struct wined3d_buffer *wined3d_buffer; + struct wined3d_buffer *wined3d_buffer = NULL; struct d3d_buffer *buffer_impl; if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, start_slot + i, &wined3d_buffer, &offsets[i], &strides[i]))) - ERR("Failed to get vertex buffer %u.\n", start_slot + i); + { + FIXME("Failed to get vertex buffer %u.\n", start_slot + i); + if (strides) + strides[i] = 0; + if (offsets) + offsets[i] = 0; + } if (!wined3d_buffer) { @@ -4415,7 +4421,7 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetVertexBuffers(ID3D10Device1 *ifa wined3d_mutex_lock(); for (i = 0; i < buffer_count; ++i) { - struct wined3d_buffer *wined3d_buffer; + struct wined3d_buffer *wined3d_buffer = NULL; struct d3d_buffer *buffer_impl; if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, start_slot + i,