[PATCH 4/5] wined3d: Use glClearDepthf() when available.
Matteo Bruni
mbruni at codeweavers.com
Wed Nov 25 11:11:29 CST 2020
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
dlls/wined3d/texture.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 2f42a41754f..41e4415f13f 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -5398,7 +5398,10 @@ static void ffp_blitter_clear_rendertargets(struct wined3d_device *device, unsig
{
gl_info->gl_ops.gl.p_glDepthMask(GL_TRUE);
context_invalidate_state(context, STATE_DEPTH_STENCIL);
- gl_info->gl_ops.gl.p_glClearDepth(depth);
+ if (gl_info->supported[ARB_ES2_COMPATIBILITY])
+ GL_EXTCALL(glClearDepthf(depth));
+ else
+ gl_info->gl_ops.gl.p_glClearDepth(depth);
checkGLcall("glClearDepth");
clear_mask = clear_mask | GL_DEPTH_BUFFER_BIT;
}
--
2.26.2
More information about the wine-devel
mailing list