mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-11 08:40:02 +01:00
gsdx: dump and log EE texture read
It gives a visual opportunity to detect a bad read of the texture cache
This commit is contained in:
1 parent
10ea05bc6f
commit
f76bf9dddc
4 files changed
+38
-24
No files matched your search
@@ -62,6 +62,8 @@ GSRendererSW::GSRendererSW(int threads)
|
||||
InitCVB(GS_LINE_CLASS);
|
||||
InitCVB(GS_TRIANGLE_CLASS);
|
||||
InitCVB(GS_SPRITE_CLASS);
|
||||
|
||||
m_dump_root = root_sw;
|
||||
}
|
||||
|
||||
GSRendererSW::~GSRendererSW()
|
||||
@@ -258,7 +260,7 @@ GSTexture* GSRendererSW::GetOutput(int i, int& y_offset)
|
||||
{
|
||||
if(s_savef && s_n >= s_saven)
|
||||
{
|
||||
m_texture[i]->Save(root_sw + format("%05d_f%lld_fr%d_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), i, (int)DISPFB.Block(), (int)DISPFB.PSM));
|
||||
m_texture[i]->Save(m_dump_root + format("%05d_f%lld_fr%d_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), i, (int)DISPFB.Block(), (int)DISPFB.PSM));
|
||||
}
|
||||
|
||||
s_n++;
|
||||
@@ -531,8 +533,8 @@ void GSRendererSW::Draw()
|
||||
// Dump Register state
|
||||
s = format("%05d_context.txt", s_n);
|
||||
|
||||
m_env.Dump(root_sw+s);
|
||||
m_context->Dump(root_sw+s);
|
||||
m_env.Dump(m_dump_root+s);
|
||||
m_context->Dump(m_dump_root+s);
|
||||
}
|
||||
|
||||
if(s_savet && s_n >= s_saven && PRIM->TME)
|
||||
@@ -540,11 +542,11 @@ void GSRendererSW::Draw()
|
||||
if (texture_shuffle) {
|
||||
// Dump the RT in 32 bits format. It helps to debug texture shuffle effect
|
||||
s = format("%05d_f%lld_tex_%05x_32bits.bmp", s_n, frame, (int)m_context->TEX0.TBP0);
|
||||
m_mem.SaveBMP(root_sw+s, m_context->TEX0.TBP0, m_context->TEX0.TBW, 0, 1 << m_context->TEX0.TW, 1 << m_context->TEX0.TH);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->TEX0.TBP0, m_context->TEX0.TBW, 0, 1 << m_context->TEX0.TW, 1 << m_context->TEX0.TH);
|
||||
}
|
||||
|
||||
s = format("%05d_f%lld_tex_%05x_%d.bmp", s_n, frame, (int)m_context->TEX0.TBP0, (int)m_context->TEX0.PSM);
|
||||
m_mem.SaveBMP(root_sw+s, m_context->TEX0.TBP0, m_context->TEX0.TBW, m_context->TEX0.PSM, 1 << m_context->TEX0.TW, 1 << m_context->TEX0.TH);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->TEX0.TBP0, m_context->TEX0.TBW, m_context->TEX0.PSM, 1 << m_context->TEX0.TW, 1 << m_context->TEX0.TH);
|
||||
}
|
||||
|
||||
s_n++;
|
||||
@@ -555,18 +557,18 @@ void GSRendererSW::Draw()
|
||||
if (texture_shuffle) {
|
||||
// Dump the RT in 32 bits format. It helps to debug texture shuffle effect
|
||||
s = format("%05d_f%lld_rt0_%05x_32bits.bmp", s_n, frame, m_context->FRAME.Block());
|
||||
m_mem.SaveBMP(root_sw+s, m_context->FRAME.Block(), m_context->FRAME.FBW, 0, GetFrameRect().width(), 512);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->FRAME.Block(), m_context->FRAME.FBW, 0, GetFrameRect().width(), 512);
|
||||
}
|
||||
|
||||
s = format("%05d_f%lld_rt0_%05x_%d.bmp", s_n, frame, m_context->FRAME.Block(), m_context->FRAME.PSM);
|
||||
m_mem.SaveBMP(root_sw+s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, GetFrameRect().width(), 512);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, GetFrameRect().width(), 512);
|
||||
}
|
||||
|
||||
if(s_savez && s_n >= s_saven)
|
||||
{
|
||||
s = format("%05d_f%lld_rz0_%05x_%d.bmp", s_n, frame, m_context->ZBUF.Block(), m_context->ZBUF.PSM);
|
||||
|
||||
m_mem.SaveBMP(root_sw+s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
||||
}
|
||||
|
||||
s_n++;
|
||||
@@ -580,18 +582,18 @@ void GSRendererSW::Draw()
|
||||
if (texture_shuffle) {
|
||||
// Dump the RT in 32 bits format. It helps to debug texture shuffle effect
|
||||
s = format("%05d_f%lld_rt1_%05x_32bits.bmp", s_n, frame, m_context->FRAME.Block());
|
||||
m_mem.SaveBMP(root_sw+s, m_context->FRAME.Block(), m_context->FRAME.FBW, 0, GetFrameRect().width(), 512);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->FRAME.Block(), m_context->FRAME.FBW, 0, GetFrameRect().width(), 512);
|
||||
}
|
||||
|
||||
s = format("%05d_f%lld_rt1_%05x_%d.bmp", s_n, frame, m_context->FRAME.Block(), m_context->FRAME.PSM);
|
||||
m_mem.SaveBMP(root_sw+s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, GetFrameRect().width(), 512);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, GetFrameRect().width(), 512);
|
||||
}
|
||||
|
||||
if(s_savez && s_n >= s_saven)
|
||||
{
|
||||
s = format("%05d_f%lld_rz1_%05x_%d.bmp", s_n, frame, m_context->ZBUF.Block(), m_context->ZBUF.PSM);
|
||||
|
||||
m_mem.SaveBMP(root_sw+s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
||||
}
|
||||
|
||||
s_n++;
|
||||
@@ -685,14 +687,14 @@ void GSRendererSW::Sync(int reason)
|
||||
{
|
||||
s = format("%05d_f%lld_rt1_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), m_context->FRAME.Block(), m_context->FRAME.PSM);
|
||||
|
||||
m_mem.SaveBMP(root_sw+s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, GetFrameRect().width(), 512);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, GetFrameRect().width(), 512);
|
||||
}
|
||||
|
||||
if(s_savez)
|
||||
{
|
||||
s = format("%05d_f%lld_zb1_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), m_context->ZBUF.Block(), m_context->ZBUF.PSM);
|
||||
|
||||
m_mem.SaveBMP(root_sw+s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
||||
m_mem.SaveBMP(m_dump_root+s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user