mirror of https://github.com/PCSX2/pcsx2.git
gsdx dx/gl: fix depth optimization
4th bit is the fog value, not the depth
This commit is contained in:
parent
7b222768d4
commit
b6693c4345
|
@ -159,7 +159,7 @@ void GSRendererDX::EmulateZbuffer()
|
||||||
|
|
||||||
GSVertex* v = &m_vertex.buff[0];
|
GSVertex* v = &m_vertex.buff[0];
|
||||||
// Minor optimization of a corner case (it allow to better emulate some alpha test effects)
|
// 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
|
#ifdef _DEBUG
|
||||||
fprintf(stdout, "Optimize Z test GEQUAL to ALWAYS (%s)\n", psm_str(m_context->ZBUF.PSM));
|
fprintf(stdout, "Optimize Z test GEQUAL to ALWAYS (%s)\n", psm_str(m_context->ZBUF.PSM));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -253,7 +253,7 @@ void GSRendererOGL::EmulateZbuffer()
|
||||||
|
|
||||||
GSVertex* v = &m_vertex.buff[0];
|
GSVertex* v = &m_vertex.buff[0];
|
||||||
// Minor optimization of a corner case (it allow to better emulate some alpha test effects)
|
// 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));
|
GL_INS("Optimize Z test GEQUAL to ALWAYS (%s)", psm_str(m_context->ZBUF.PSM));
|
||||||
m_om_dssel.ztst = ZTST_ALWAYS;
|
m_om_dssel.ztst = ZTST_ALWAYS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue