Skip to content

Commit

Permalink
gsdx dx/gl: fix depth optimization
Browse files Browse the repository at this point in the history
4th bit is the fog value, not the depth
  • Loading branch information
gregory38 committed Aug 27, 2016
1 parent 7b22276 commit b6693c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/GSdx/GSRendererDX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void GSRendererDX::EmulateZbuffer()

GSVertex* v = &m_vertex.buff[0];
// Minor optimization of a corner case (it allow to better emulate some alpha test effects)
if (om_dssel.ztst == ZTST_GEQUAL && (m_vt.m_eq.xyzf & 0x8) && v[0].XYZ.Z == max_z) {
if (om_dssel.ztst == ZTST_GEQUAL && (m_vt.m_eq.xyzf & 0x4) && v[0].XYZ.Z == max_z) {
#ifdef _DEBUG
fprintf(stdout, "Optimize Z test GEQUAL to ALWAYS (%s)\n", psm_str(m_context->ZBUF.PSM));
#endif
Expand Down
2 changes: 1 addition & 1 deletion plugins/GSdx/GSRendererOGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void GSRendererOGL::EmulateZbuffer()

GSVertex* v = &m_vertex.buff[0];
// Minor optimization of a corner case (it allow to better emulate some alpha test effects)
if (m_om_dssel.ztst == ZTST_GEQUAL && (m_vt.m_eq.xyzf & 0x8) && v[0].XYZ.Z == max_z) {
if (m_om_dssel.ztst == ZTST_GEQUAL && (m_vt.m_eq.xyzf & 0x4) && v[0].XYZ.Z == max_z) {
GL_INS("Optimize Z test GEQUAL to ALWAYS (%s)", psm_str(m_context->ZBUF.PSM));
m_om_dssel.ztst = ZTST_ALWAYS;
}
Expand Down

0 comments on commit b6693c4

Please sign in to comment.