d3d9: Introduce a helper to convert d3d9 sampler 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:05:00 +04:30 committed by Alexandre Julliard
parent 705de1ea00
commit 91a8266987
1 changed files with 6 additions and 1 deletions

View File

@ -566,6 +566,11 @@ static enum wined3d_render_state wined3d_render_state_from_d3d(D3DRENDERSTATETYP
return (enum wined3d_render_state)type;
}
static enum wined3d_sampler_state wined3d_sampler_state_from_d3d(D3DSAMPLERSTATETYPE type)
{
return (enum wined3d_sampler_state)type;
}
static void device_reset_viewport_state(struct d3d9_device *device)
{
struct wined3d_viewport vp;
@ -2755,7 +2760,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetSamplerState(IDirect3DDev
sampler -= D3DVERTEXTEXTURESAMPLER0 - WINED3D_VERTEX_SAMPLER_OFFSET;
wined3d_mutex_lock();
wined3d_stateblock_set_sampler_state(device->update_state, sampler, state, value);
wined3d_stateblock_set_sampler_state(device->update_state, sampler, wined3d_sampler_state_from_d3d(state), value);
wined3d_mutex_unlock();
return D3D_OK;