summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-02-06 19:52:23 +0000
committerhrydgard <hrydgard@gmail.com>2009-02-06 19:52:23 +0000
commit1d0e8ddf84f261ce2a43a318cd3c7c72b09ccf4e (patch)
tree36a4121c20636835236ae73f391112f21904e276 /Source/Core
parent60b25def1819e34e8bd0a285da5c09271b64fade (diff)
more info in the vertex loader debug display
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2128 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/VertexLoader.cpp36
-rw-r--r--Source/Core/VideoCommon/Src/VertexLoader.h5
2 files changed, 29 insertions, 12 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.cpp b/Source/Core/VideoCommon/Src/VertexLoader.cpp
index 83103856fb..e3abb2d3ef 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoader.cpp
@@ -700,17 +700,35 @@ void VertexLoader::SetVAT(u32 _group0, u32 _group1, u32 _group2)
m_VtxAttr.texCoord[7].Frac = vat.g2.Tex7Frac;
};
-void VertexLoader::AppendToString(std::string *dest) {
+void VertexLoader::AppendToString(std::string *dest)
+{
+ dest->reserve(150);
static const char *posMode[4] = {
- "Invalid",
- "Direct",
- "Idx8",
- "Idx16",
+ "Inv",
+ "Dir",
+ "I8 ",
+ "I16",
};
static const char *posFormats[5] = {
- "u8", "s8", "u16", "s16", "flt",
+ "u8 ", "s8 ", "u16", "s16", "flt",
+ };
+ dest->append(StringFromFormat("%ib skin: %i P: %i %s %s ",
+ m_VertexSize, m_VtxDesc.PosMatIdx,
+ m_VtxAttr.PosElements ? 3 : 2, posMode[m_VtxDesc.Position], posFormats[m_VtxAttr.PosFormat]));
+ dest->append(StringFromFormat("Nrm: %i %s %s ",
+ m_VtxAttr.NormalElements, posMode[m_VtxDesc.Normal], posFormats[m_VtxAttr.NormalFormat]));
+
+ int tex_mode[8] = {
+ m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord,
+ m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, m_VtxDesc.Tex7Coord
};
- dest->append(StringFromFormat("sz: %i skin: %i Pos: %i %s %s Nrm: %i %s %s - %i vtx\n",
- m_VertexSize, m_VtxDesc.PosMatIdx, m_VtxAttr.PosElements ? 3 : 2, posMode[m_VtxDesc.Position], posFormats[m_VtxAttr.PosFormat],
- m_VtxAttr.NormalElements, posMode[m_VtxDesc.Normal], posFormats[m_VtxAttr.NormalFormat], m_numLoadedVertices));
+ for (int i = 0; i < 8; i++)
+ {
+ if (tex_mode[i])
+ {
+ dest->append(StringFromFormat("T%i: %i %s %s ",
+ i, m_VtxAttr.texCoord[i].Elements, posMode[tex_mode[i]], posFormats[m_VtxAttr.texCoord[i].Format]));
+ }
+ }
+ dest->append(StringFromFormat(" - %i v\n", m_numLoadedVertices));
}
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.h b/Source/Core/VideoCommon/Src/VertexLoader.h
index 54ddce4c14..0e91fa7c67 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader.h
+++ b/Source/Core/VideoCommon/Src/VertexLoader.h
@@ -97,9 +97,8 @@ private:
void WriteCall(TPipelineFunction);
- void WriteGetVariable(int bits, Gen::OpArg, void*);
-
- void WriteSetVariable(int bits, void*, Gen::OpArg);
+ void WriteGetVariable(int bits, Gen::OpArg dest, void *address);
+ void WriteSetVariable(int bits, void *address, Gen::OpArg dest);
};
#endif