wined3d: Invalidate the relevant sampler when unloading a currently bound texture.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-08-07 16:12:00 +04:30 committed by Alexandre Julliard
parent 6a66af88de
commit 3bc8df5166
1 changed files with 3 additions and 0 deletions

View File

@ -639,6 +639,9 @@ static void wined3d_texture_gl_unload_texture(struct wined3d_texture_gl *texture
const struct wined3d_gl_info *gl_info = NULL;
struct wined3d_context *context = NULL;
if (texture_gl->t.resource.bind_count)
device_invalidate_state(device, STATE_SAMPLER(texture_gl->t.sampler));
if (texture_gl->texture_rgb.name || texture_gl->texture_srgb.name
|| texture_gl->rb_multisample || texture_gl->rb_resolved)
{