2016-02-20 15:00 GMT+01:00 Paul Gofman gofmanp@gmail.com:
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
dlls/wined3d/state.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 60bfd41..aa13a95 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -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");
}}
}
-- 2.5.0
Henri is away this week so this patch will probably have to wait until he's back. FWIW I think this patch is fine, thank you.
On 02/23/2016 02:07 AM, Matteo Bruni wrote:
Henri is away this week so this patch will probably have to wait until he's back. FWIW I think this patch is fine, thank you.
Thank you very much for the comment.