DX9 debugger improvements:

- Fix "Pause at next" functionality for pixel/vertex shader changes, finished frames and texture changes.
- Implement dumping vertex declaration and vertex/index data.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6496 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-11-29 16:16:48 +00:00
parent 40c4e5f9a7
commit 8d123adf64
11 changed files with 173 additions and 30 deletions

View File

@ -37,6 +37,11 @@ public:
~D3DVertexFormat();
virtual void Initialize(const PortableVertexDeclaration &_vtx_decl);
virtual void SetupVertexPointers() const;
#if defined(_DEBUG) || defined(DEBUGFAST)
D3DVERTEXELEMENT9 elements[32];
int num_elements;
#endif
};
namespace DX9
@ -49,6 +54,17 @@ NativeVertexFormat* VertexManager::CreateNativeVertexFormat()
}
void DX9::VertexManager::GetElements(NativeVertexFormat* format, D3DVERTEXELEMENT9** elems, int* num)
{
#if defined(_DEBUG) || defined(DEBUGFAST)
*elems = ((D3DVertexFormat*)format)->elements;
*num = ((D3DVertexFormat*)format)->num_elements;
#else
*elems = NULL;
*num = 0;
#endif
}
D3DVertexFormat::~D3DVertexFormat()
{
if (d3d_decl)
@ -163,6 +179,10 @@ void D3DVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl)
PanicAlert("Failed to create D3D vertex declaration!");
return;
}
#if defined(_DEBUG) || defined(DEBUGFAST)
memcpy(&elements, elems, sizeof(elems));
num_elements = elem_idx;
#endif
}
void D3DVertexFormat::SetupVertexPointers() const