mirror of https://github.com/PCSX2/pcsx2.git
gsdx debug: count draw call in a different way
* Always do +1 before the draw call * Prefix texture name with i (as input) to keep them before the FB Goal is to ensure that all renderers share the same draw call value.
This commit is contained in:
parent
fd58ee6289
commit
97172f5e51
|
@ -199,6 +199,8 @@ bool GSRenderer::Merge(int field)
|
||||||
GSTexture* tex[2] = {NULL, NULL};
|
GSTexture* tex[2] = {NULL, NULL};
|
||||||
int y_offset[2] = {0, 0};
|
int y_offset[2] = {0, 0};
|
||||||
|
|
||||||
|
s_n++;
|
||||||
|
|
||||||
if(samesrc && fr[0].bottom == fr[1].bottom)
|
if(samesrc && fr[0].bottom == fr[1].bottom)
|
||||||
{
|
{
|
||||||
tex[0] = GetOutput(0, y_offset[0]);
|
tex[0] = GetOutput(0, y_offset[0]);
|
||||||
|
|
|
@ -199,8 +199,6 @@ GSTexture* GSRendererCL::GetOutput(int i, int& y_offset)
|
||||||
{
|
{
|
||||||
m_texture[i]->Save(format("c:\\temp1\\_%05d_f%lld_fr%d_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), i, (int)DISPFB.Block(), (int)DISPFB.PSM));
|
m_texture[i]->Save(format("c:\\temp1\\_%05d_f%lld_fr%d_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), i, (int)DISPFB.Block(), (int)DISPFB.PSM));
|
||||||
}
|
}
|
||||||
|
|
||||||
s_n++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,13 +279,11 @@ void GSRendererCL::Draw()
|
||||||
|
|
||||||
if(s_save && s_n >= s_saven && PRIM->TME)
|
if(s_save && s_n >= s_saven && PRIM->TME)
|
||||||
{
|
{
|
||||||
s = format("c:\\temp1\\_%05d_f%lld_tex_%05x_%d.bmp", s_n, frame, (int)m_context->TEX0.TBP0, (int)m_context->TEX0.PSM);
|
s = format("c:\\temp1\\_%05d_f%lld_itex_%05x_%d.bmp", s_n, frame, (int)m_context->TEX0.TBP0, (int)m_context->TEX0.PSM);
|
||||||
|
|
||||||
m_mem.SaveBMP(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(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++;
|
|
||||||
|
|
||||||
if(s_save && s_n >= s_saven)
|
if(s_save && s_n >= s_saven)
|
||||||
{
|
{
|
||||||
s = format("c:\\temp1\\_%05d_f%lld_rt0_%05x_%d.bmp", s_n, frame, m_context->FRAME.Block(), m_context->FRAME.PSM);
|
s = format("c:\\temp1\\_%05d_f%lld_rt0_%05x_%d.bmp", s_n, frame, m_context->FRAME.Block(), m_context->FRAME.PSM);
|
||||||
|
@ -301,8 +297,6 @@ void GSRendererCL::Draw()
|
||||||
|
|
||||||
m_mem.SaveBMP(s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
m_mem.SaveBMP(s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_n++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -558,8 +552,6 @@ void GSRendererCL::Draw()
|
||||||
|
|
||||||
m_mem.SaveBMP(s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
m_mem.SaveBMP(s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, GetFrameRect().width(), 512);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_n++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -246,8 +246,6 @@ GSTexture* GSRendererHW::GetOutput(int i, int& y_offset)
|
||||||
t->Save(m_dump_root + format("%05d_f%lld_fr%d_%05x_%s.bmp", s_n, m_perfmon.GetFrame(), i, (int)TEX0.TBP0, psm_str(TEX0.PSM)));
|
t->Save(m_dump_root + format("%05d_f%lld_fr%d_%05x_%s.bmp", s_n, m_perfmon.GetFrame(), i, (int)TEX0.TBP0, psm_str(TEX0.PSM)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s_n++;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,7 +399,6 @@ void GSRendererHW::Draw()
|
||||||
{
|
{
|
||||||
if(m_dev->IsLost() || IsBadFrame()) {
|
if(m_dev->IsLost() || IsBadFrame()) {
|
||||||
GL_INS("Warning skipping a draw call (%d)", s_n);
|
GL_INS("Warning skipping a draw call (%d)", s_n);
|
||||||
s_n += 3; // Keep it sync with SW renderer
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GL_PUSH("HW Draw %d", s_n);
|
GL_PUSH("HW Draw %d", s_n);
|
||||||
|
@ -431,7 +428,6 @@ void GSRendererHW::Draw()
|
||||||
m_channel_shuffle = draw_sprite_tex && (m_context->TEX0.PSM == PSM_PSMT8) && single_page;
|
m_channel_shuffle = draw_sprite_tex && (m_context->TEX0.PSM == PSM_PSMT8) && single_page;
|
||||||
if (m_channel_shuffle) {
|
if (m_channel_shuffle) {
|
||||||
GL_CACHE("Channel shuffle effect detected SKIP");
|
GL_CACHE("Channel shuffle effect detected SKIP");
|
||||||
s_n += 3; // Keep it sync with SW renderer
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (draw_sprite_tex && m_context->FRAME.Block() == m_context->TEX0.TBP0) {
|
} else if (draw_sprite_tex && m_context->FRAME.Block() == m_context->TEX0.TBP0) {
|
||||||
|
@ -623,7 +619,7 @@ void GSRendererHW::Draw()
|
||||||
|
|
||||||
if(s_savet && s_n >= s_saven && tex)
|
if(s_savet && s_n >= s_saven && tex)
|
||||||
{
|
{
|
||||||
s = format("%05d_f%lld_tex_%05x_%s_%d%d_%02x_%02x_%02x_%02x.dds",
|
s = format("%05d_f%lld_itex_%05x_%s_%d%d_%02x_%02x_%02x_%02x.dds",
|
||||||
s_n, frame, (int)context->TEX0.TBP0, psm_str(context->TEX0.PSM),
|
s_n, frame, (int)context->TEX0.TBP0, psm_str(context->TEX0.PSM),
|
||||||
(int)context->CLAMP.WMS, (int)context->CLAMP.WMT,
|
(int)context->CLAMP.WMS, (int)context->CLAMP.WMT,
|
||||||
(int)context->CLAMP.MINU, (int)context->CLAMP.MAXU,
|
(int)context->CLAMP.MINU, (int)context->CLAMP.MAXU,
|
||||||
|
@ -633,14 +629,12 @@ void GSRendererHW::Draw()
|
||||||
|
|
||||||
if(tex->m_palette)
|
if(tex->m_palette)
|
||||||
{
|
{
|
||||||
s = format("%05d_f%lld_tpx_%05x_%s.dds", s_n, frame, context->TEX0.CBP, psm_str(context->TEX0.CPSM));
|
s = format("%05d_f%lld_itpx_%05x_%s.dds", s_n, frame, context->TEX0.CBP, psm_str(context->TEX0.CPSM));
|
||||||
|
|
||||||
tex->m_palette->Save(m_dump_root+s, true);
|
tex->m_palette->Save(m_dump_root+s, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s_n++;
|
|
||||||
|
|
||||||
if(s_save && s_n >= s_saven)
|
if(s_save && s_n >= s_saven)
|
||||||
{
|
{
|
||||||
s = format("%05d_f%lld_rt0_%05x_%s.bmp", s_n, frame, context->FRAME.Block(), psm_str(context->FRAME.PSM));
|
s = format("%05d_f%lld_rt0_%05x_%s.bmp", s_n, frame, context->FRAME.Block(), psm_str(context->FRAME.PSM));
|
||||||
|
@ -657,10 +651,6 @@ void GSRendererHW::Draw()
|
||||||
ds_tex->Save(m_dump_root+s);
|
ds_tex->Save(m_dump_root+s);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_n++;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
s_n += 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The rectangle of the draw
|
// The rectangle of the draw
|
||||||
|
@ -668,13 +658,11 @@ void GSRendererHW::Draw()
|
||||||
|
|
||||||
if(m_hacks.m_oi && !(this->*m_hacks.m_oi)(rt_tex, ds_tex, tex))
|
if(m_hacks.m_oi && !(this->*m_hacks.m_oi)(rt_tex, ds_tex, tex))
|
||||||
{
|
{
|
||||||
s_n += 1; // keep counter sync
|
|
||||||
GL_INS("Warning skipping a draw call (%d)", s_n);
|
GL_INS("Warning skipping a draw call (%d)", s_n);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!OI_BlitFMV(rt, tex, r)) {
|
if (!OI_BlitFMV(rt, tex, r)) {
|
||||||
s_n += 1; // keep counter sync
|
|
||||||
GL_INS("Warning skipping a draw call (%d)", s_n);
|
GL_INS("Warning skipping a draw call (%d)", s_n);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -826,14 +814,10 @@ void GSRendererHW::Draw()
|
||||||
ds_tex->Save(m_dump_root+s);
|
ds_tex->Save(m_dump_root+s);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_n++;
|
|
||||||
|
|
||||||
if(s_savel > 0 && (s_n - s_saven) > s_savel)
|
if(s_savel > 0 && (s_n - s_saven) > s_savel)
|
||||||
{
|
{
|
||||||
s_dump = 0;
|
s_dump = 0;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
s_n += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DISABLE_HW_TEXTURE_CACHE
|
#ifdef DISABLE_HW_TEXTURE_CACHE
|
||||||
|
|
|
@ -275,8 +275,6 @@ GSTexture* GSRendererSW::GetOutput(int i, int& y_offset)
|
||||||
{
|
{
|
||||||
m_texture[i]->Save(m_dump_root + format("%05d_f%lld_fr%d_%05x_%s.bmp", s_n, m_perfmon.GetFrame(), i, (int)DISPFB.Block(), psm_str(DISPFB.PSM)));
|
m_texture[i]->Save(m_dump_root + format("%05d_f%lld_fr%d_%05x_%s.bmp", s_n, m_perfmon.GetFrame(), i, (int)DISPFB.Block(), psm_str(DISPFB.PSM)));
|
||||||
}
|
}
|
||||||
|
|
||||||
s_n++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,7 +465,6 @@ void GSRendererSW::Draw()
|
||||||
|
|
||||||
if(!GetScanlineGlobalData(sd))
|
if(!GetScanlineGlobalData(sd))
|
||||||
{
|
{
|
||||||
s_n += 3; // Keep it sync with HW renderer
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,16 +551,14 @@ void GSRendererSW::Draw()
|
||||||
{
|
{
|
||||||
if (texture_shuffle) {
|
if (texture_shuffle) {
|
||||||
// Dump the RT in 32 bits format. It helps to debug texture shuffle effect
|
// Dump the RT in 32 bits format. It helps to debug texture shuffle effect
|
||||||
s = format("%05d_f%lld_texraw_%05x_32bits.bmp", s_n, frame, (int)m_context->TEX0.TBP0);
|
s = format("%05d_f%lld_itexraw_%05x_32bits.bmp", s_n, frame, (int)m_context->TEX0.TBP0);
|
||||||
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);
|
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_texraw_%05x_%s.bmp", s_n, frame, (int)m_context->TEX0.TBP0, psm_str(m_context->TEX0.PSM));
|
s = format("%05d_f%lld_itexraw_%05x_%s.bmp", s_n, frame, (int)m_context->TEX0.TBP0, psm_str(m_context->TEX0.PSM));
|
||||||
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);
|
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++;
|
|
||||||
|
|
||||||
if(s_save && s_n >= s_saven)
|
if(s_save && s_n >= s_saven)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -584,8 +579,6 @@ void GSRendererSW::Draw()
|
||||||
m_mem.SaveBMP(m_dump_root+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++;
|
|
||||||
|
|
||||||
Queue(data);
|
Queue(data);
|
||||||
|
|
||||||
Sync(3);
|
Sync(3);
|
||||||
|
@ -609,8 +602,6 @@ void GSRendererSW::Draw()
|
||||||
m_mem.SaveBMP(m_dump_root+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++;
|
|
||||||
|
|
||||||
if(s_savel > 0 && (s_n - s_saven) > s_savel)
|
if(s_savel > 0 && (s_n - s_saven) > s_savel)
|
||||||
{
|
{
|
||||||
s_dump = 0;
|
s_dump = 0;
|
||||||
|
@ -694,8 +685,6 @@ void GSRendererSW::Sync(int reason)
|
||||||
|
|
||||||
if(0) if(LOG)
|
if(0) if(LOG)
|
||||||
{
|
{
|
||||||
s_n++;
|
|
||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
|
|
||||||
if(s_save)
|
if(s_save)
|
||||||
|
@ -1640,7 +1629,7 @@ void GSRendererSW::SharedData::UpdateSource()
|
||||||
{
|
{
|
||||||
const GIFRegTEX0& TEX0 = m_parent->GetTex0Layer(i);
|
const GIFRegTEX0& TEX0 = m_parent->GetTex0Layer(i);
|
||||||
|
|
||||||
s = format("%05d_f%lld_tex%d_%05x_%s.bmp", m_parent->s_n - 2, frame, i, TEX0.TBP0, psm_str(TEX0.PSM));
|
s = format("%05d_f%lld_itex%d_%05x_%s.bmp", m_parent->s_n, frame, i, TEX0.TBP0, psm_str(TEX0.PSM));
|
||||||
|
|
||||||
m_tex[i].t->Save(root_sw+s);
|
m_tex[i].t->Save(root_sw+s);
|
||||||
}
|
}
|
||||||
|
@ -1651,7 +1640,7 @@ void GSRendererSW::SharedData::UpdateSource()
|
||||||
|
|
||||||
t->Update(GSVector4i(0, 0, 256, 1), global.clut, sizeof(uint32) * 256);
|
t->Update(GSVector4i(0, 0, 256, 1), global.clut, sizeof(uint32) * 256);
|
||||||
|
|
||||||
s = format("%05d_f%lld_texp_%05x_%s.bmp", m_parent->s_n - 2, frame, (int)m_parent->m_context->TEX0.CBP, psm_str(m_parent->m_context->TEX0.CPSM));
|
s = format("%05d_f%lld_itexp_%05x_%s.bmp", m_parent->s_n, frame, (int)m_parent->m_context->TEX0.CBP, psm_str(m_parent->m_context->TEX0.CPSM));
|
||||||
|
|
||||||
t->Save(root_sw+s);
|
t->Save(root_sw+s);
|
||||||
|
|
||||||
|
|
|
@ -1479,6 +1479,7 @@ void GSState::FlushPrim()
|
||||||
if(m_index.tail > 0)
|
if(m_index.tail > 0)
|
||||||
{
|
{
|
||||||
GSVertex buff[2];
|
GSVertex buff[2];
|
||||||
|
s_n++;
|
||||||
|
|
||||||
size_t head = m_vertex.head;
|
size_t head = m_vertex.head;
|
||||||
size_t tail = m_vertex.tail;
|
size_t tail = m_vertex.tail;
|
||||||
|
|
Loading…
Reference in New Issue