mirror of https://github.com/PCSX2/pcsx2.git
gsdx-debug: improve debug experience
* Dump context before the increase of s_n => aligned with the global call number * Don't print colclip not supported when it is optimized away * dettach the input texture when it is useless => avoid to show a wrong texture in the debugger
This commit is contained in:
parent
f665180d11
commit
b884e0c0c0
|
@ -373,6 +373,14 @@ void GSRendererHW::Draw()
|
||||||
|
|
||||||
string s;
|
string s;
|
||||||
|
|
||||||
|
if (s_n >= s_saven) {
|
||||||
|
// Dump Register state
|
||||||
|
s = format("%05d_context.txt", s_n);
|
||||||
|
|
||||||
|
m_env.Dump(root_hw+s);
|
||||||
|
m_context->Dump(root_hw+s);
|
||||||
|
}
|
||||||
|
|
||||||
if(s_savet && s_n >= s_saven && tex)
|
if(s_savet && s_n >= s_saven && tex)
|
||||||
{
|
{
|
||||||
s = format("%05d_f%lld_tex_%05x_%d_%d%d_%02x_%02x_%02x_%02x.dds",
|
s = format("%05d_f%lld_tex_%05x_%d_%d%d_%02x_%02x_%02x_%02x.dds",
|
||||||
|
@ -409,13 +417,6 @@ void GSRendererHW::Draw()
|
||||||
|
|
||||||
s_n++;
|
s_n++;
|
||||||
|
|
||||||
if (s_n >= s_saven) {
|
|
||||||
// Dump Register state
|
|
||||||
s = format("%05d_context.txt", s_n);
|
|
||||||
|
|
||||||
m_env.Dump(root_hw+s);
|
|
||||||
m_context->Dump(root_hw+s);
|
|
||||||
}
|
|
||||||
#ifdef ENABLE_OGL_DEBUG
|
#ifdef ENABLE_OGL_DEBUG
|
||||||
} else {
|
} else {
|
||||||
s_n += 2;
|
s_n += 2;
|
||||||
|
|
|
@ -448,7 +448,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
||||||
} else if (acc_colclip_wrap) {
|
} else if (acc_colclip_wrap) {
|
||||||
ps_sel.colclip = 3;
|
ps_sel.colclip = 3;
|
||||||
GL_INS("COLCLIP SW ENABLED (blending is %d/%d/%d/%d)", context->ALPHA.A, context->ALPHA.B, context->ALPHA.C, context->ALPHA.D);
|
GL_INS("COLCLIP SW ENABLED (blending is %d/%d/%d/%d)", context->ALPHA.A, context->ALPHA.B, context->ALPHA.C, context->ALPHA.D);
|
||||||
} else if (env.COLCLAMP.CLAMP == 0) {
|
} else if (env.COLCLAMP.CLAMP == 0 && (context->ALPHA.A != context->ALPHA.B)) {
|
||||||
GL_INS("COLCLIP NOT SUPPORTED (blending is %d/%d/%d/%d)", context->ALPHA.A, context->ALPHA.B, context->ALPHA.C, context->ALPHA.D);
|
GL_INS("COLCLIP NOT SUPPORTED (blending is %d/%d/%d/%d)", context->ALPHA.A, context->ALPHA.B, context->ALPHA.C, context->ALPHA.D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,6 +569,11 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
||||||
if (spritehack && (ps_sel.atst == 2)) {
|
if (spritehack && (ps_sel.atst == 2)) {
|
||||||
ps_sel.atst = 1;
|
ps_sel.atst = 1;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
#ifdef ENABLE_OGL_DEBUG
|
||||||
|
// Unattach texture to avoid noise in debugger
|
||||||
|
dev->PSSetShaderResource(0, NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the blending equation to detect special case
|
// Compute the blending equation to detect special case
|
||||||
|
|
|
@ -516,6 +516,14 @@ void GSRendererSW::Draw()
|
||||||
|
|
||||||
string s;
|
string s;
|
||||||
|
|
||||||
|
if (s_n >= s_saven) {
|
||||||
|
// Dump Register state
|
||||||
|
s = format("%05d_context.txt", s_n);
|
||||||
|
|
||||||
|
m_env.Dump(root_sw+s);
|
||||||
|
m_context->Dump(root_sw+s);
|
||||||
|
}
|
||||||
|
|
||||||
if(s_savet && s_n >= s_saven && PRIM->TME)
|
if(s_savet && s_n >= s_saven && PRIM->TME)
|
||||||
{
|
{
|
||||||
s = format("%05d_f%lld_tex_%05x_%d.bmp", s_n, frame, (int)m_context->TEX0.TBP0, (int)m_context->TEX0.PSM);
|
s = format("%05d_f%lld_tex_%05x_%d.bmp", s_n, frame, (int)m_context->TEX0.TBP0, (int)m_context->TEX0.PSM);
|
||||||
|
@ -541,14 +549,6 @@ void GSRendererSW::Draw()
|
||||||
|
|
||||||
s_n++;
|
s_n++;
|
||||||
|
|
||||||
if (s_n >= s_saven) {
|
|
||||||
// Dump Register state
|
|
||||||
s = format("%05d_context.txt", s_n);
|
|
||||||
|
|
||||||
m_env.Dump(root_sw+s);
|
|
||||||
m_context->Dump(root_sw+s);
|
|
||||||
}
|
|
||||||
|
|
||||||
Queue(data);
|
Queue(data);
|
||||||
|
|
||||||
Sync(3);
|
Sync(3);
|
||||||
|
|
Loading…
Reference in New Issue