d3d9: Introduce a helper to convert d3d9 render states to wined3d states.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-04-02 15:04:59 +04:30 committed by Alexandre Julliard
parent 4393d284fd
commit 705de1ea00
1 changed files with 6 additions and 1 deletions

View File

@ -561,6 +561,11 @@ static enum wined3d_transform_state wined3d_transform_state_from_d3d(D3DTRANSFOR
return (enum wined3d_transform_state)type;
}
static enum wined3d_render_state wined3d_render_state_from_d3d(D3DRENDERSTATETYPE type)
{
return (enum wined3d_render_state)type;
}
static void device_reset_viewport_state(struct d3d9_device *device)
{
struct wined3d_viewport vp;
@ -2404,7 +2409,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetRenderState(IDirect3DDevi
TRACE("iface %p, state %#x, value %#x.\n", iface, state, value);
wined3d_mutex_lock();
wined3d_stateblock_set_render_state(device->update_state, state, value);
wined3d_stateblock_set_render_state(device->update_state, wined3d_render_state_from_d3d(state), value);
if (state == D3DRS_POINTSIZE && value == D3D9_RESZ_CODE)
resolve_depth_buffer(device);
wined3d_mutex_unlock();