/[pcsx2_0.9.7]/trunk/pcsx2/x86/newVif.h
ViewVC logotype

Diff of /trunk/pcsx2/x86/newVif.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/pcsx2/x86/newVif.h	2010/12/23 11:48:33	279
+++ trunk/pcsx2/x86/newVif.h	2010/12/23 12:02:12	280
@@ -19,6 +19,8 @@
 #include "VU.h"
 
 #include "x86emitter/x86emitter.h"
+#include "System/RecTypes.h"
+
 using namespace x86Emitter;
 
 #define aMax(x, y) std::max(x,y)
@@ -28,13 +30,14 @@
 typedef u32  (__fastcall *nVifCall)(void*, const void*);
 typedef void (__fastcall *nVifrecCall)(uptr dest, uptr src);
 
-#include "newVif_BlockBuffer.h"
 #include "newVif_HashBucket.h"
 
 extern void  mVUmergeRegs(const xRegisterSSE& dest, const xRegisterSSE& src,  int xyzw, bool modXYZW = 0);
 extern void _nVifUnpack  (int idx, const u8* data, uint mode, bool isFill);
+extern void  dVifReserve (int idx);
 extern void  dVifReset   (int idx);
 extern void  dVifClose   (int idx);
+extern void  dVifRelease (int idx);
 extern void  VifUnpackSSE_Init();
 
 _vifT extern void  dVifUnpack  (const u8* data, bool isFill);
@@ -76,23 +79,25 @@
 	u32						bSize;			// Size of 'buffer'
 	u32						bPtr;
 
-	u32						idx;			// VIF0 or VIF1
-	u8*						recPtr;			// Cur Pos to recompile to
-	u8*						recEnd;			// 'Safe' End of Rec Cache
-	BlockBuffer*			vifCache;		// Block Buffer
+	uint					recReserveSizeMB;	// reserve size, in megabytes.
+	RecompiledCodeReserve*	recReserve;
+	u8*						recWritePtr;		// current write pos into the reserve
+
 	HashBucket<_tParams>*	vifBlocks;		// Vif Blocks
 	int						numBlocks;		// # of Blocks Recompiled
-	
-	nVifStruct()
-	{
-		vifCache	=  NULL;
-		vifBlocks	=  NULL;
-		numBlocks	=  0;
-		recPtr		=  NULL;
-		recEnd		=  NULL;
-	}
+
+	// VIF0 or VIF1 - provided for debugging helpfulness only, and is generally unused.
+	// (templates are used for most or all VIF indexing)
+	u32						idx;
+
+	nVifStruct();
 };
 
+extern void reserveNewVif(int idx);
+extern void closeNewVif(int idx);
+extern void resetNewVif(int idx);
+extern void releaseNewVif(int idx);
+
 extern __aligned16 nVifStruct nVif[2];
 extern __aligned16 nVifCall nVifUpk[(2*2*16)*4]; // ([USN][Masking][Unpack Type]) [curCycle]
 extern __aligned16 u32		nVifMask[3][4][4];	 // [MaskNumber][CycleNumber][Vector]

 

  ViewVC Help
Powered by ViewVC 1.1.22