summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2010-11-29 16:16:48 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2010-11-29 16:16:48 +0000
commit8d123adf6403510a7ab7e63f62e85117ef6b4eea (patch)
treec2ff6ec6ba59db9c3fcd7ff69548c7a3cf30f171 /Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp
parent40c4e5f9a7813cd39802b4a730941f9aec4cae57 (diff)
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
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp b/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp
index 13a7c37d36..a05883bab1 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp
@@ -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