Commit 9a686f66 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Implement d3d11_immediate_context_IAGetIndexBuffer().

parent 0df9480d
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment