Skip to content

Commit

Permalink
wined3d: call glEnable(GL_DEPTH_TEST) for unrecognized depth buffer type
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Hädicke <felixhaedicke@web.de>
  • Loading branch information
felixhaedicke committed Jul 10, 2019
1 parent 6b53a95 commit 6b914f3
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions dlls/wined3d/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,24 +232,15 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
zenable = WINED3D_ZB_FALSE;
}

switch (zenable)
if (zenable == WINED3D_ZB_FALSE)
{
case WINED3D_ZB_FALSE:
gl_info->gl_ops.gl.p_glDisable(GL_DEPTH_TEST);
checkGLcall("glDisable GL_DEPTH_TEST");
break;
case WINED3D_ZB_TRUE:
gl_info->gl_ops.gl.p_glEnable(GL_DEPTH_TEST);
checkGLcall("glEnable GL_DEPTH_TEST");
break;
case WINED3D_ZB_USEW:
gl_info->gl_ops.gl.p_glEnable(GL_DEPTH_TEST);
checkGLcall("glEnable GL_DEPTH_TEST");
FIXME("W buffer is not well handled\n");
break;
default:
FIXME("Unrecognized depth buffer type %#x.\n", zenable);
break;
gl_info->gl_ops.gl.p_glDisable(GL_DEPTH_TEST);
checkGLcall("glDisable GL_DEPTH_TEST");
}
else
{
gl_info->gl_ops.gl.p_glEnable(GL_DEPTH_TEST);
checkGLcall("glEnable GL_DEPTH_TEST");
}

if (context->last_was_rhw && !isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION)))
Expand Down

0 comments on commit 6b914f3

Please sign in to comment.