diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index 7cb3f9c61e..4f9c9bb759 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -199,6 +199,8 @@ bool GSRenderer::Merge(int field) GSTexture* tex[2] = {NULL, NULL}; int y_offset[2] = {0, 0}; + s_n++; + if(samesrc && fr[0].bottom == fr[1].bottom) { tex[0] = GetOutput(0, y_offset[0]); diff --git a/plugins/GSdx/GSRendererCL.cpp b/plugins/GSdx/GSRendererCL.cpp index 99f5eb5890..16d59458de 100644 --- a/plugins/GSdx/GSRendererCL.cpp +++ b/plugins/GSdx/GSRendererCL.cpp @@ -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)); } - - s_n++; } } @@ -281,13 +279,11 @@ void GSRendererCL::Draw() 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); } - s_n++; - 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); @@ -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); } - - s_n++; } 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); } - - s_n++; } } diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index 5caba6f4f8..94efa025dd 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -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))); } } - - s_n++; #endif } @@ -401,7 +399,6 @@ void GSRendererHW::Draw() { if(m_dev->IsLost() || IsBadFrame()) { GL_INS("Warning skipping a draw call (%d)", s_n); - s_n += 3; // Keep it sync with SW renderer return; } 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; if (m_channel_shuffle) { GL_CACHE("Channel shuffle effect detected SKIP"); - s_n += 3; // Keep it sync with SW renderer return; } } 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) { - 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), (int)context->CLAMP.WMS, (int)context->CLAMP.WMT, (int)context->CLAMP.MINU, (int)context->CLAMP.MAXU, @@ -633,14 +629,12 @@ void GSRendererHW::Draw() 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); } } - s_n++; - 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)); @@ -657,10 +651,6 @@ void GSRendererHW::Draw() ds_tex->Save(m_dump_root+s); } - s_n++; - - } else { - s_n += 2; } // 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)) { - s_n += 1; // keep counter sync GL_INS("Warning skipping a draw call (%d)", s_n); return; } if (!OI_BlitFMV(rt, tex, r)) { - s_n += 1; // keep counter sync GL_INS("Warning skipping a draw call (%d)", s_n); return; } @@ -826,14 +814,10 @@ void GSRendererHW::Draw() ds_tex->Save(m_dump_root+s); } - s_n++; - if(s_savel > 0 && (s_n - s_saven) > s_savel) { s_dump = 0; } - } else { - s_n += 1; } #ifdef DISABLE_HW_TEXTURE_CACHE diff --git a/plugins/GSdx/GSRendererSW.cpp b/plugins/GSdx/GSRendererSW.cpp index f99e3ff042..50d8e9e8f1 100644 --- a/plugins/GSdx/GSRendererSW.cpp +++ b/plugins/GSdx/GSRendererSW.cpp @@ -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))); } - - s_n++; } } @@ -467,7 +465,6 @@ void GSRendererSW::Draw() if(!GetScanlineGlobalData(sd)) { - s_n += 3; // Keep it sync with HW renderer return; } @@ -554,16 +551,14 @@ 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_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); } - 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); } - s_n++; - 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); } - s_n++; - Queue(data); 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); } - s_n++; - if(s_savel > 0 && (s_n - s_saven) > s_savel) { s_dump = 0; @@ -694,8 +685,6 @@ void GSRendererSW::Sync(int reason) if(0) if(LOG) { - s_n++; - std::string s; if(s_save) @@ -1640,7 +1629,7 @@ void GSRendererSW::SharedData::UpdateSource() { 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); } @@ -1651,7 +1640,7 @@ void GSRendererSW::SharedData::UpdateSource() 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); diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index ff4ca1440e..079f00237e 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -1479,6 +1479,7 @@ void GSState::FlushPrim() if(m_index.tail > 0) { GSVertex buff[2]; + s_n++; size_t head = m_vertex.head; size_t tail = m_vertex.tail;