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: Paul Gofman <gofmanp@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
65999e26b2
commit
749d5a577b
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue