Commit f4eb08e8 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3d11: Use wined3d_device_context_set_unordered_access_view().

parent beab8a64
......@@ -963,7 +963,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargetsAndUnord
UINT unordered_access_view_start_slot, UINT unordered_access_view_count,
ID3D11UnorderedAccessView *const *unordered_access_views, const UINT *initial_counts)
{
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
unsigned int i;
TRACE("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p, "
......@@ -984,21 +984,22 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargetsAndUnord
wined3d_mutex_lock();
for (i = 0; i < unordered_access_view_start_slot; ++i)
{
wined3d_device_set_unordered_access_view(device->wined3d_device, i, NULL, ~0u);
wined3d_device_context_set_unordered_access_view(context->wined3d_context,
WINED3D_PIPELINE_GRAPHICS, i, NULL, ~0u);
}
for (i = 0; i < unordered_access_view_count; ++i)
{
struct d3d11_unordered_access_view *view
= unsafe_impl_from_ID3D11UnorderedAccessView(unordered_access_views[i]);
wined3d_device_set_unordered_access_view(device->wined3d_device,
unordered_access_view_start_slot + i,
wined3d_device_context_set_unordered_access_view(context->wined3d_context,
WINED3D_PIPELINE_GRAPHICS, unordered_access_view_start_slot + i,
view ? view->wined3d_view : NULL, initial_counts ? initial_counts[i] : ~0u);
}
for (; unordered_access_view_start_slot + i < D3D11_PS_CS_UAV_REGISTER_COUNT; ++i)
{
wined3d_device_set_unordered_access_view(device->wined3d_device,
unordered_access_view_start_slot + i, NULL, ~0u);
wined3d_device_context_set_unordered_access_view(context->wined3d_context,
WINED3D_PIPELINE_GRAPHICS, unordered_access_view_start_slot + i, NULL, ~0u);
}
wined3d_mutex_unlock();
}
......@@ -2621,10 +2622,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon
wined3d_device_set_rendertarget_view(device->wined3d_device, i, NULL, FALSE);
}
wined3d_device_set_depth_stencil_view(device->wined3d_device, NULL);
for (i = 0; i < D3D11_PS_CS_UAV_REGISTER_COUNT; ++i)
for (i = 0; i < WINED3D_PIPELINE_COUNT; ++i)
{
wined3d_device_set_unordered_access_view(device->wined3d_device, i, NULL, ~0u);
wined3d_device_set_cs_uav(device->wined3d_device, i, NULL, ~0u);
for (j = 0; j < D3D11_PS_CS_UAV_REGISTER_COUNT; ++j)
wined3d_device_context_set_unordered_access_view(context->wined3d_context, i, j, NULL, ~0u);
}
ID3D11DeviceContext1_OMSetDepthStencilState(iface, NULL, 0);
ID3D11DeviceContext1_OMSetBlendState(iface, NULL, blend_factor, D3D11_DEFAULT_SAMPLE_MASK);
......
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