rsx: better naming for draw calls

This commit is contained in:
Vincent Lejeune 2015-11-09 23:57:35 +01:00
parent b238107a99
commit b5add0f027
3 changed files with 7 additions and 5 deletions

View File

@ -646,7 +646,7 @@ namespace rsx
if (rsx->domethod(id, arg))
{
if (rsx->capture_current_frame && id == NV4097_CLEAR_SURFACE)
rsx->capture_frame();
rsx->capture_frame("clear");
return;
}
@ -895,7 +895,7 @@ namespace rsx
}
}
void thread::capture_frame()
void thread::capture_frame(const std::string &name)
{
frame_capture_data::draw_state draw_state = {};
@ -939,6 +939,7 @@ namespace rsx
draw_state.stencil.data.resize(clip_w * clip_h * 4);
copy_stencil_buffer_to_memory(draw_state.stencil.data.data());
}
draw_state.name = name;
frame_debug.draw_calls.push_back(draw_state);
}
@ -956,7 +957,7 @@ namespace rsx
transform_constants.clear();
if (capture_current_frame)
capture_frame();
capture_frame("Draw " + std::to_string(vertex_draw_count));
}
void thread::task()

View File

@ -23,6 +23,7 @@ struct frame_capture_data
struct draw_state
{
std::string name;
buffer color_buffer[4];
buffer depth;
buffer stencil;
@ -200,7 +201,7 @@ namespace rsx
virtual void load_vertex_index_data(u32 first, u32 count);
bool capture_current_frame = false;
void capture_frame();
void capture_frame(const std::string &name);
public:
u32 ioAddress, ioSize;
int flip_status;

View File

@ -527,7 +527,7 @@ void RSXDebugger::GetMemory()
command_dump.close();
for (u32 i = 0;i < frame_debug.draw_calls.size(); i++)
m_list_captured_draw_calls->InsertItem(0, std::to_string(frame_debug.draw_calls.size() - i - 1));
m_list_captured_draw_calls->InsertItem(i, frame_debug.draw_calls[i].name);
}