diff options
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/VideoCommon/Src/CPMemory.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/CPMemory.h | 10 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/NativeVertexFormat.h | 7 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/VideoState.cpp | 3 |
4 files changed, 16 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/Src/CPMemory.cpp b/Source/Core/VideoCommon/Src/CPMemory.cpp index 06aa8d6192..837dde70ac 100644 --- a/Source/Core/VideoCommon/Src/CPMemory.cpp +++ b/Source/Core/VideoCommon/Src/CPMemory.cpp @@ -24,3 +24,6 @@ u32 arraybases[16]; u32 arraystrides[16];
TMatrixIndexA MatrixIndexA;
TMatrixIndexB MatrixIndexB;
+TVtxDesc g_VtxDesc;
+// Most games only use the first VtxAttr and simply reconfigure it all the time as needed.
+VAT g_VtxAttr[8];
diff --git a/Source/Core/VideoCommon/Src/CPMemory.h b/Source/Core/VideoCommon/Src/CPMemory.h index 67e918292d..9557984ecf 100644 --- a/Source/Core/VideoCommon/Src/CPMemory.h +++ b/Source/Core/VideoCommon/Src/CPMemory.h @@ -248,4 +248,14 @@ extern u32 arraystrides[16]; extern TMatrixIndexA MatrixIndexA;
extern TMatrixIndexB MatrixIndexB;
+struct VAT
+{
+ UVAT_group0 g0;
+ UVAT_group1 g1;
+ UVAT_group2 g2;
+};
+
+extern TVtxDesc g_VtxDesc;
+extern VAT g_VtxAttr[8];
+
#endif
diff --git a/Source/Core/VideoCommon/Src/NativeVertexFormat.h b/Source/Core/VideoCommon/Src/NativeVertexFormat.h index e0213c4ad2..2f3dd08f9b 100644 --- a/Source/Core/VideoCommon/Src/NativeVertexFormat.h +++ b/Source/Core/VideoCommon/Src/NativeVertexFormat.h @@ -55,17 +55,12 @@ enum { VB_HAS_UVTEXMTXSHIFT=13,
};
-
#define LOADERDECL __cdecl
typedef void (LOADERDECL *TPipelineFunction)(const void *);
-// This will soon be used in a cache of vertex formats, rather than used in-place.
// The implementation of this class is specific for GL/DX, so NativeVertexFormat.cpp
// is in the respective plugin, not here in VideoCommon.
-// This class will also be split into NativeVertexFormat and VertexFormatConverter.
-// VertexFormatConverters will be cached, indexed by TVtxDesc+TVtxAttr.
-
// Note that this class can't just invent arbitrary vertex formats out of its input -
// all the data loading code must always be made compatible.
class NativeVertexFormat
@@ -84,6 +79,4 @@ public: u32 m_components; // VB_HAS_X. Bitmask telling what vertex components are present.
};
-
-
#endif // _NATIVEVERTEXFORMAT_H
diff --git a/Source/Core/VideoCommon/Src/VideoState.cpp b/Source/Core/VideoCommon/Src/VideoState.cpp index 70a812e113..55b7c6f9f7 100644 --- a/Source/Core/VideoCommon/Src/VideoState.cpp +++ b/Source/Core/VideoCommon/Src/VideoState.cpp @@ -32,6 +32,9 @@ static void DoState(PointerWrap &p) { p.DoArray(arraystrides, 16);
p.Do(MatrixIndexA);
p.Do(MatrixIndexB);
+ p.Do(g_VtxDesc.Hex);
+ p.DoArray(g_VtxAttr, 8);
+
// XF Memory
p.Do(xfregs);
p.DoArray(xfmem, XFMEM_SIZE);
|
