Commit 749d5a57 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

wined3d: Bind default sampler object when setting sampler state with no texture.

When sampler state was applied and no stage texture was present in state, no glBindSampler was issued for the stage after dummy texture was bound, and previously bound sampler was still active. This could result in undefined behaviour, especially if previously bound sampler was a shadow sample (this caused warnings from Nvidia driver). Signed-off-by: 's avatarPaul Gofman <gofmanp@gmail.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 65999e26
......@@ -3627,6 +3627,11 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
else
{
context_bind_texture(context, GL_NONE, 0);
if (gl_info->supported[ARB_SAMPLER_OBJECTS])
{
GL_EXTCALL(glBindSampler(mapped_stage, 0));
checkGLcall("glBindSampler");
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment