d3d8: Use wined3d_stateblock_get_state() in d3d8_device_GetRenderState().

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-11-27 23:53:40 -06:00 committed by Alexandre Julliard
parent 9af3f8f684
commit 2b0fd0cf16
1 changed files with 4 additions and 2 deletions

View File

@ -1875,18 +1875,20 @@ static HRESULT WINAPI d3d8_device_GetRenderState(IDirect3DDevice8 *iface,
D3DRENDERSTATETYPE state, DWORD *value)
{
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
const struct wined3d_stateblock_state *device_state;
TRACE("iface %p, state %#x, value %p.\n", iface, state, value);
wined3d_mutex_lock();
device_state = wined3d_stateblock_get_state(device->state);
switch (state)
{
case D3DRS_ZBIAS:
*value = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS);
*value = device_state->rs[WINED3D_RS_DEPTHBIAS];
break;
default:
*value = wined3d_device_get_render_state(device->wined3d_device, state);
*value = device_state->rs[state];
}
wined3d_mutex_unlock();