gsdx debug: create savet option

0: don't dump input texture
1: dump input texture

Now, you can do a first pass with only RT. When you find the wrong call, you can redump the input texture of the bad draw.
This commit is contained in:
Gregory Hainaut 2015-05-01 13:35:21 +02:00
parent f96a653d05
commit c8a3db114c
5 changed files with 10 additions and 4 deletions

View File

@ -1588,6 +1588,10 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer)
//while(IsWindowVisible(hWnd))
//FIXME map?
int finished = theApp.GetConfig("linux_replay", 1);
if (theApp.GetConfig("dump", 0)) {
fprintf(stderr, "Dump is enabled. Replay will be disabled\n");
finished = 1;
}
unsigned long frame_number = 0;
unsigned long total_frame_nb = 0;
while(finished > 0)

View File

@ -394,7 +394,7 @@ void GSRendererHW::Draw()
string s;
if(s_save && 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_n, frame, (int)context->TEX0.TBP0, (int)context->TEX0.PSM,

View File

@ -255,7 +255,7 @@ GSTexture* GSRendererSW::GetOutput(int i)
{
if(s_save && s_n >= s_saven)
{
m_texture[i]->Save(root_sw + 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(root_sw + format("%05d_f%lld_fr%d_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), i, (int)DISPFB.Block(), (int)DISPFB.PSM));
}
s_n++;
@ -516,7 +516,7 @@ void GSRendererSW::Draw()
string s;
if(s_save && 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);
@ -1619,7 +1619,7 @@ void GSRendererSW::SharedData::UpdateSource()
string s;
if(m_parent->s_save && m_parent->s_n >= m_parent->s_saven)
if(m_parent->s_savet && m_parent->s_n >= m_parent->s_saven)
{
for(size_t i = 0; m_tex[i].t != NULL; i++)
{

View File

@ -48,6 +48,7 @@ GSState::GSState()
s_n = 0;
s_dump = !!theApp.GetConfig("dump", 0);
s_save = !!theApp.GetConfig("save", 0);
s_savet = !!theApp.GetConfig("savet", 0);
s_savez = !!theApp.GetConfig("savez", 0);
s_saven = theApp.GetConfig("saven", 0);
#ifdef __linux__

View File

@ -205,6 +205,7 @@ public:
int s_n;
bool s_dump;
bool s_save;
bool s_savet;
bool s_savez;
int s_saven;