d3d11: Implement d3d11_immediate_context_SOSetTargets().

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:
Józef Kucia 2015-11-11 03:41:00 +01:00 committed by Alexandre Julliard
parent cf2c41e873
commit 4b281147e1
1 changed files with 19 additions and 1 deletions

View File

@ -645,7 +645,25 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3
static void STDMETHODCALLTYPE d3d11_immediate_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
ID3D11Buffer *const *buffers, const UINT *offsets)
{
FIXME("iface %p, buffer_count %u, buffers %p, offsets %p stub!\n", iface, buffer_count, buffers, offsets);
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
unsigned int count, i;
TRACE("iface %p, buffer_count %u, buffers %p, offsets %p.\n", iface, buffer_count, buffers, offsets);
count = min(buffer_count, D3D11_SO_BUFFER_SLOT_COUNT);
wined3d_mutex_lock();
for (i = 0; i < count; ++i)
{
struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]);
wined3d_device_set_stream_output(device->wined3d_device, i,
buffer ? buffer->wined3d_buffer : NULL, offsets[i]);
}
for (; i < D3D11_SO_BUFFER_SLOT_COUNT; ++i)
{
wined3d_device_set_stream_output(device->wined3d_device, i, NULL, 0);
}
wined3d_mutex_unlock();
}
static void STDMETHODCALLTYPE d3d11_immediate_context_DrawAuto(ID3D11DeviceContext *iface)