wined3d: Use glClearDepthf() when available.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2020-11-25 18:11:29 +01:00 committed by Alexandre Julliard
parent 967227958d
commit 881e0a4310
1 changed files with 4 additions and 1 deletions

View File

@ -5398,6 +5398,9 @@ static void ffp_blitter_clear_rendertargets(struct wined3d_device *device, unsig
{ {
gl_info->gl_ops.gl.p_glDepthMask(GL_TRUE); gl_info->gl_ops.gl.p_glDepthMask(GL_TRUE);
context_invalidate_state(context, STATE_DEPTH_STENCIL); context_invalidate_state(context, STATE_DEPTH_STENCIL);
if (gl_info->supported[ARB_ES2_COMPATIBILITY])
GL_EXTCALL(glClearDepthf(depth));
else
gl_info->gl_ops.gl.p_glClearDepth(depth); gl_info->gl_ops.gl.p_glClearDepth(depth);
checkGLcall("glClearDepth"); checkGLcall("glClearDepth");
clear_mask = clear_mask | GL_DEPTH_BUFFER_BIT; clear_mask = clear_mask | GL_DEPTH_BUFFER_BIT;