mirror of https://github.com/PCSX2/pcsx2.git
parent
7a40b27931
commit
6558317a7e
|
@ -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 & 0x4) && v[0].XYZ.Z == max_z) {
|
if (om_dssel.ztst == ZTST_GEQUAL && m_vt.m_eq.z && 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
|
||||||
|
@ -445,7 +445,7 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
fprintf(stdout, "Complex Alpha Test\n");
|
fprintf(stdout, "Complex Alpha Test\n");
|
||||||
#endif
|
#endif
|
||||||
bool commutative_depth = (om_dssel.ztst == ZTST_GEQUAL && (m_vt.m_eq.xyzf & 0x4)) || (om_dssel.ztst == ZTST_ALWAYS);
|
bool commutative_depth = (om_dssel.ztst == ZTST_GEQUAL && m_vt.m_eq.z) || (om_dssel.ztst == ZTST_ALWAYS);
|
||||||
bool commutative_alpha = (m_context->ALPHA.C != 1); // when either Alpha Src or a constant
|
bool commutative_alpha = (m_context->ALPHA.C != 1); // when either Alpha Src or a constant
|
||||||
|
|
||||||
ate_RGBA_then_Z = (m_context->TEST.AFAIL == AFAIL_FB_ONLY) & commutative_depth;
|
ate_RGBA_then_Z = (m_context->TEST.AFAIL == AFAIL_FB_ONLY) & commutative_depth;
|
||||||
|
|
|
@ -834,7 +834,7 @@ bool GSRendererHW::OI_DoubleHalfClear(GSTexture* rt, GSTexture* ds, GSTextureCac
|
||||||
const GSLocalMemory::psm_t& depth_psm = GSLocalMemory::m_psm[m_context->ZBUF.PSM];
|
const GSLocalMemory::psm_t& depth_psm = GSLocalMemory::m_psm[m_context->ZBUF.PSM];
|
||||||
|
|
||||||
// Z and color must be constant and the same
|
// Z and color must be constant and the same
|
||||||
if (m_vt.m_eq.rgba != 0xFFFF || !(m_vt.m_eq.xyzf & 0x4) || v[1].XYZ.Z != v[1].RGBAQ.u32[0])
|
if (m_vt.m_eq.rgba != 0xFFFF || !m_vt.m_eq.z || v[1].XYZ.Z != v[1].RGBAQ.u32[0])
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Format doesn't have the same size. It smells fishy
|
// Format doesn't have the same size. It smells fishy
|
||||||
|
|
|
@ -281,7 +281,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 & 0x4) && v[0].XYZ.Z == max_z) {
|
if (m_om_dssel.ztst == ZTST_GEQUAL && m_vt.m_eq.z && 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;
|
||||||
}
|
}
|
||||||
|
@ -1338,7 +1338,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
||||||
bool ate_skip = false;
|
bool ate_skip = false;
|
||||||
if (ate_first_pass & ate_second_pass) {
|
if (ate_first_pass & ate_second_pass) {
|
||||||
GL_INS("Complex Alpha Test");
|
GL_INS("Complex Alpha Test");
|
||||||
bool commutative_depth = (m_om_dssel.ztst == ZTST_GEQUAL && (m_vt.m_eq.xyzf & 0x4)) || (m_om_dssel.ztst == ZTST_ALWAYS);
|
bool commutative_depth = (m_om_dssel.ztst == ZTST_GEQUAL && m_vt.m_eq.z) || (m_om_dssel.ztst == ZTST_ALWAYS);
|
||||||
bool commutative_alpha = (m_context->ALPHA.C != 1); // when either Alpha Src or a constant
|
bool commutative_alpha = (m_context->ALPHA.C != 1); // when either Alpha Src or a constant
|
||||||
|
|
||||||
ate_RGBA_then_Z = (m_context->TEST.AFAIL == AFAIL_FB_ONLY) & commutative_depth;
|
ate_RGBA_then_Z = (m_context->TEST.AFAIL == AFAIL_FB_ONLY) & commutative_depth;
|
||||||
|
|
Loading…
Reference in New Issue