mirror of https://github.com/PCSX2/pcsx2.git
gsdx-debug: create the savef option
The idea is to easily extract bad frame from gs dump and to compare them with the sw renderer. Here the summary of the options: savet => dump all input textures save => dump the render target savez => dump the depth buffer savef => dump the frame
This commit is contained in:
parent
d301848848
commit
9d69ff1f91
|
@ -454,6 +454,7 @@ void populate_debug_table(GtkWidget* debug_table)
|
||||||
GtkWidget* gl_debug_check = CreateCheckBox("Print GL error", "debug_opengl");
|
GtkWidget* gl_debug_check = CreateCheckBox("Print GL error", "debug_opengl");
|
||||||
GtkWidget* gs_dump_check = CreateCheckBox("Dump GS data", "dump");
|
GtkWidget* gs_dump_check = CreateCheckBox("Dump GS data", "dump");
|
||||||
GtkWidget* gs_save_check = CreateCheckBox("Save RT", "save");
|
GtkWidget* gs_save_check = CreateCheckBox("Save RT", "save");
|
||||||
|
GtkWidget* gs_savef_check = CreateCheckBox("Save Frame", "savef");
|
||||||
GtkWidget* gs_savet_check = CreateCheckBox("Save Texture", "savet");
|
GtkWidget* gs_savet_check = CreateCheckBox("Save Texture", "savet");
|
||||||
GtkWidget* gs_savez_check = CreateCheckBox("Save Depth", "savez");
|
GtkWidget* gs_savez_check = CreateCheckBox("Save Depth", "savez");
|
||||||
|
|
||||||
|
@ -465,7 +466,8 @@ void populate_debug_table(GtkWidget* debug_table)
|
||||||
s_table_line = 0;
|
s_table_line = 0;
|
||||||
InsertWidgetInTable(debug_table, gl_debug_check, glsl_debug_check);
|
InsertWidgetInTable(debug_table, gl_debug_check, glsl_debug_check);
|
||||||
InsertWidgetInTable(debug_table, gs_dump_check);
|
InsertWidgetInTable(debug_table, gs_dump_check);
|
||||||
InsertWidgetInTable(debug_table, gs_save_check, gs_savet_check, gs_savez_check);
|
InsertWidgetInTable(debug_table, gs_save_check, gs_savef_check);
|
||||||
|
InsertWidgetInTable(debug_table, gs_savet_check, gs_savez_check);
|
||||||
InsertWidgetInTable(debug_table, gs_saven_label, gs_saven_spin);
|
InsertWidgetInTable(debug_table, gs_saven_label, gs_saven_spin);
|
||||||
InsertWidgetInTable(debug_table, gs_savel_label, gs_savel_spin);
|
InsertWidgetInTable(debug_table, gs_savel_label, gs_savel_spin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ GSTexture* GSRendererHW::GetOutput(int i)
|
||||||
|
|
||||||
if(s_dump)
|
if(s_dump)
|
||||||
{
|
{
|
||||||
if(s_save && s_n >= s_saven)
|
if(s_savef && s_n >= s_saven)
|
||||||
{
|
{
|
||||||
t->Save(root_hw + format("%05d_f%lld_fr%d_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), i, (int)TEX0.TBP0, (int)TEX0.PSM));
|
t->Save(root_hw + format("%05d_f%lld_fr%d_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), i, (int)TEX0.TBP0, (int)TEX0.PSM));
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ GSTexture* GSRendererSW::GetOutput(int i)
|
||||||
|
|
||||||
if(s_dump)
|
if(s_dump)
|
||||||
{
|
{
|
||||||
if(s_save && s_n >= s_saven)
|
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(root_sw + format("%05d_f%lld_fr%d_%05x_%d.bmp", s_n, m_perfmon.GetFrame(), i, (int)DISPFB.Block(), (int)DISPFB.PSM));
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,13 +45,14 @@ GSState::GSState()
|
||||||
{
|
{
|
||||||
m_nativeres = !!theApp.GetConfig("nativeres", 1);
|
m_nativeres = !!theApp.GetConfig("nativeres", 1);
|
||||||
|
|
||||||
s_n = 0;
|
s_n = 0;
|
||||||
s_dump = !!theApp.GetConfig("dump", 0);
|
s_dump = !!theApp.GetConfig("dump", 0);
|
||||||
s_save = !!theApp.GetConfig("save", 0);
|
s_save = !!theApp.GetConfig("save", 0);
|
||||||
s_savet = !!theApp.GetConfig("savet", 0);
|
s_savet = !!theApp.GetConfig("savet", 0);
|
||||||
s_savez = !!theApp.GetConfig("savez", 0);
|
s_savez = !!theApp.GetConfig("savez", 0);
|
||||||
s_saven = theApp.GetConfig("saven", 0);
|
s_saven = !!theApp.GetConfig("saven", 0);
|
||||||
s_savel = theApp.GetConfig("savel", 5000);
|
s_savef = !!theApp.GetConfig("savef", 0);
|
||||||
|
s_savel = !!theApp.GetConfig("savel", 5000);
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if (s_dump) {
|
if (s_dump) {
|
||||||
mkdir("/tmp/GS_HW_dump", 0777);
|
mkdir("/tmp/GS_HW_dump", 0777);
|
||||||
|
|
|
@ -208,6 +208,7 @@ public:
|
||||||
bool s_save;
|
bool s_save;
|
||||||
bool s_savet;
|
bool s_savet;
|
||||||
bool s_savez;
|
bool s_savez;
|
||||||
|
bool s_savef;
|
||||||
int s_saven;
|
int s_saven;
|
||||||
int s_savel;
|
int s_savel;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue