[PATCH] wined3d: Avoid calling removed/deprecated GL functions in SetupForBlit().
Matteo Bruni
matteo.mystral at gmail.com
Fri Dec 8 10:44:32 CST 2017
2017-12-08 16:14 GMT+01:00 Józef Kucia <joseph.kucia at gmail.com>:
> On Fri, Dec 8, 2017 at 4:01 PM, Matteo Bruni <matteo.mystral at gmail.com> wrote:
>> I'd rather go in a slightly different direction for this i.e. see the
>> attached patch.
>>
>> I'm not rejecting your patch though.
>
> Your patch is nicer, but it doesn't fix all GL errors (e.g. alpha
> test).
Er, right, for that it also needs the attached followup.
Anyway, your patch is probably a better fit for 3.0 (and it's
complete, which is not the case for my patch). I'll keep rebasing my
patches and hopefully send them soon after 3.0.
-------------- next part --------------
commit 8caf5a9013ca899adf28e081af8017433625f53f
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Sat Oct 24 00:46:15 2015 +0200
wined3d: Don't modify legacy GL states when blitting on core profile.
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index fe9a011825..3a067ddc9c 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2893,9 +2893,12 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
context_invalidate_state(context, STATE_SAMPLER(sampler));
}
- gl_info->gl_ops.gl.p_glDisable(GL_ALPHA_TEST);
- checkGLcall("glDisable(GL_ALPHA_TEST)");
- context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHATESTENABLE));
+ if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
+ {
+ gl_info->gl_ops.gl.p_glDisable(GL_ALPHA_TEST);
+ checkGLcall("glDisable(GL_ALPHA_TEST)");
+ context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHATESTENABLE));
+ }
gl_info->gl_ops.gl.p_glDisable(GL_DEPTH_TEST);
checkGLcall("glDisable(GL_DEPTH_TEST)");
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ZENABLE));
More information about the wine-devel
mailing list