d3d8: Handle stateblocks in d3d8_device_SetRenderState().

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 2019-10-03 19:38:07 -05:00 committed by Alexandre Julliard
parent c9ee1b0b88
commit e3a89b6e86
1 changed files with 5 additions and 9 deletions

View File

@ -1827,15 +1827,11 @@ static HRESULT WINAPI d3d8_device_SetRenderState(IDirect3DDevice8 *iface,
TRACE("iface %p, state %#x, value %#x.\n", iface, state, value);
wined3d_mutex_lock();
switch (state)
{
case D3DRS_ZBIAS:
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value);
break;
default:
wined3d_device_set_render_state(device->wined3d_device, state, value);
}
if (state == D3DRS_ZBIAS)
state = WINED3D_RS_DEPTHBIAS;
wined3d_stateblock_set_render_state(device->update_state, state, value);
if (!device->recording)
wined3d_device_set_render_state(device->wined3d_device, state, value);
wined3d_mutex_unlock();
return D3D_OK;