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

View file

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

View file

@ -527,7 +527,7 @@ void RSXDebugger::GetMemory()
command_dump.close(); command_dump.close();
for (u32 i = 0;i < frame_debug.draw_calls.size(); i++) 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);
} }