d3d11: Introduce wined3d_device_context_set_rasterizer_state().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-03-10 19:25:20 -06:00 committed by Alexandre Julliard
parent 7494294d6f
commit a5154c00f8
1 changed files with 3 additions and 2 deletions

View File

@ -1135,6 +1135,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DispatchIndirect(ID3D11Dev
static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceContext1 *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceContext1 *iface,
ID3D11RasterizerState *rasterizer_state) ID3D11RasterizerState *rasterizer_state)
{ {
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
struct d3d_rasterizer_state *rasterizer_state_impl; struct d3d_rasterizer_state *rasterizer_state_impl;
const D3D11_RASTERIZER_DESC *desc; const D3D11_RASTERIZER_DESC *desc;
@ -1144,13 +1145,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state))) if (!(rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state)))
{ {
wined3d_device_set_rasterizer_state(device->wined3d_device, NULL); wined3d_device_context_set_rasterizer_state(context->wined3d_context, NULL);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return; return;
} }
wined3d_device_set_rasterizer_state(device->wined3d_device, rasterizer_state_impl->wined3d_state); wined3d_device_context_set_rasterizer_state(context->wined3d_context, rasterizer_state_impl->wined3d_state);
desc = &rasterizer_state_impl->desc; desc = &rasterizer_state_impl->desc;
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable);