From 881e0a4310e5c9caf258ea9b45e70a0c948dfc77 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Wed, 25 Nov 2020 18:11:29 +0100 Subject: [PATCH] wined3d: Use glClearDepthf() when available. Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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; }