d3d11: Implement d3d11_immediate_context_IAGetIndexBuffer().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0df9480d2d
commit
9a686f666a
|
@ -1344,7 +1344,26 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetVertexBuffers(ID3D11D
|
|||
static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetIndexBuffer(ID3D11DeviceContext *iface,
|
||||
ID3D11Buffer **buffer, DXGI_FORMAT *format, UINT *offset)
|
||||
{
|
||||
FIXME("iface %p, buffer %p, format %p, offset %p stub!\n", iface, buffer, format, offset);
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
|
||||
enum wined3d_format_id wined3d_format;
|
||||
struct wined3d_buffer *wined3d_buffer;
|
||||
struct d3d_buffer *buffer_impl;
|
||||
|
||||
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);
|
||||
*format = dxgi_format_from_wined3dformat(wined3d_format);
|
||||
if (!wined3d_buffer)
|
||||
{
|
||||
wined3d_mutex_unlock();
|
||||
*buffer = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
buffer_impl = wined3d_buffer_get_parent(wined3d_buffer);
|
||||
wined3d_mutex_unlock();
|
||||
ID3D11Buffer_AddRef(*buffer = &buffer_impl->ID3D11Buffer_iface);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
|
|
Loading…
Reference in New Issue