wined3d: Remove stateblock handling from wined3d_device_set_sampler().

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-01-23 23:30:50 -06:00 committed by Alexandre Julliard
parent 8e70ce0872
commit 7bb0d2d4e8
1 changed files with 3 additions and 4 deletions

View File

@ -2337,15 +2337,14 @@ static void wined3d_device_set_sampler(struct wined3d_device *device,
return;
}
prev = device->update_state->sampler[type][idx];
prev = device->state.sampler[type][idx];
if (sampler == prev)
return;
if (sampler)
wined3d_sampler_incref(sampler);
device->update_state->sampler[type][idx] = sampler;
if (!device->recording)
wined3d_cs_emit_set_sampler(device->cs, type, idx, sampler);
device->state.sampler[type][idx] = sampler;
wined3d_cs_emit_set_sampler(device->cs, type, idx, sampler);
if (prev)
wined3d_sampler_decref(prev);
}