Merge pull request #1322 from vlj/rsx-debug

Rsx debug: UI improvement and more opcode disasm supported
This commit is contained in:
Ivan 2015-12-01 11:28:37 +03:00
commit ed3ac91263
6 changed files with 1304 additions and 1067 deletions

1269
rpcs3/Emu/RSX/GCM.cpp Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -323,6 +323,23 @@ void RSXDebugger::OnScrollMemory(wxMouseEvent& event)
event.Skip();
}
namespace
{
void display_buffer(wxWindow *parent, const wxImage &img)
{
// wxString title = wxString::Format("Raw Image @ 0x%x", addr);
size_t width = img.GetWidth(), height = img.GetHeight();
wxFrame* f_image_viewer = new wxFrame(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize,
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN);
f_image_viewer->SetBackgroundColour(wxColour(240, 240, 240)); //This fix the ugly background color under Windows
f_image_viewer->SetAutoLayout(true);
f_image_viewer->SetClientSize(wxSize(width, height));
f_image_viewer->Show();
wxClientDC dc_canvas(f_image_viewer);
dc_canvas.DrawBitmap(img, 0, 0, false);
}
}
void RSXDebugger::OnClickBuffer(wxMouseEvent& event)
{
if (!RSXReady()) return;
@ -341,10 +358,15 @@ void RSXDebugger::OnClickBuffer(wxMouseEvent& event)
return; \
} \
if (event.GetId() == p_buffer_colorA->GetId()) SHOW_BUFFER(0);
/* if (event.GetId() == p_buffer_colorA->GetId()) SHOW_BUFFER(0);
if (event.GetId() == p_buffer_colorB->GetId()) SHOW_BUFFER(1);
if (event.GetId() == p_buffer_colorC->GetId()) SHOW_BUFFER(2);
if (event.GetId() == p_buffer_colorD->GetId()) SHOW_BUFFER(3);
if (event.GetId() == p_buffer_colorD->GetId()) SHOW_BUFFER(3);*/
if (event.GetId() == p_buffer_colorA->GetId()) display_buffer(this, buffer_img[0]);
if (event.GetId() == p_buffer_colorB->GetId()) display_buffer(this, buffer_img[1]);
if (event.GetId() == p_buffer_colorC->GetId()) display_buffer(this, buffer_img[2]);
if (event.GetId() == p_buffer_colorD->GetId()) display_buffer(this, buffer_img[3]);
if (event.GetId() == p_buffer_tex->GetId())
{
u8 location = render.textures[m_cur_texture].location();
@ -396,11 +418,11 @@ void RSXDebugger::OnClickDrawCalls(wxMouseEvent& event)
if (width && height)
{
unsigned char *orig_buffer = frame_debug.draw_calls[draw_id].color_buffer[i].data.data();
wxImage img(width, height, convert_to_wximage_buffer(orig_buffer, width, height));
buffer_img[i] = wxImage(width, height, convert_to_wximage_buffer(orig_buffer, width, height));
wxClientDC dc_canvas(p_buffers[i]);
if (img.IsOk())
dc_canvas.DrawBitmap(img.Scale(m_panel_width, m_panel_height), 0, 0, false);
if (buffer_img[i].IsOk())
dc_canvas.DrawBitmap(buffer_img[i].Scale(m_panel_width, m_panel_height), 0, 0, false);
}
}

View File

@ -30,6 +30,8 @@ class RSXDebugger : public wxFrame
wxPanel* p_buffer_stencil;
wxPanel* p_buffer_tex;
wxImage buffer_img[4];
wxTextCtrl* m_text_transform_program;
wxTextCtrl *m_text_shader_program;

View File

@ -52,6 +52,7 @@
<ClCompile Include="Emu\RSX\Common\ShaderParam.cpp" />
<ClCompile Include="Emu\RSX\Common\TextureUtils.cpp" />
<ClCompile Include="Emu\RSX\Common\VertexProgramDecompiler.cpp" />
<ClCompile Include="Emu\RSX\GCM.cpp" />
<ClCompile Include="Emu\RSX\GL\GLCommonDecompiler.cpp" />
<ClCompile Include="Emu\RSX\GL\gl_helpers.cpp" />
<ClCompile Include="Emu\RSX\Null\NullGSRender.cpp" />

View File

@ -972,6 +972,9 @@
<ClCompile Include="Emu\state.cpp">
<Filter>Emu</Filter>
</ClCompile>
<ClCompile Include="Emu\RSX\GCM.cpp">
<Filter>Emu\GPU\RSX</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Crypto\aes.h">