summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-10-22 20:54:40 +0000
committerhrydgard <hrydgard@gmail.com>2008-10-22 20:54:40 +0000
commit39df6c56243117bad6b3746dc045b05a88ab070d (patch)
tree37882583abebff815c2d2b75448ea52f6e49bd6e /Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp
parent32820d2036749005229ccfb62a91608e3d4296af (diff)
Move out Cg shader generators to VideoCommon (hope to use this in the DX plugin in the future). Also move out stats code. Comment a lot and cleanup. Kill DX9 Globals.cpp.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@938 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp b/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp
index 00397e7b37..d2beb01396 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp
@@ -28,8 +28,8 @@
#include "D3DBase.h"
#include "Common.h"
+#include "Statistics.h"
#include "Profiler.h"
-#include "Globals.h"
#include "VertexHandler.h"
#include "TransformEngine.h"
#include "OpcodeDecoding.h"
@@ -72,10 +72,7 @@ void ExecuteDisplayList(u32 address, u32 size)
g_pVideoData = startAddress;
// temporarily swap dl and non-dl(small "hack" for the stats)
- Xchg(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims);
- Xchg(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads);
- Xchg(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads);
- Xchg(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads);
+ Statistics::SwapDL();
while((u32)(g_pVideoData - startAddress) < size)
{
@@ -85,10 +82,7 @@ void ExecuteDisplayList(u32 address, u32 size)
INCSTAT(stats.thisFrame.numDListsCalled);
// un-swap
- Xchg(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims);
- Xchg(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads);
- Xchg(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads);
- Xchg(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads);
+ Statistics::SwapDL();
// reset to the old pointer
g_pVideoData = old_pVideoData;