diff options
| author | XTra.KrazzY <XTra.KrazzY@gmail.com> | 2009-07-22 22:50:52 +0000 |
|---|---|---|
| committer | XTra.KrazzY <XTra.KrazzY@gmail.com> | 2009-07-22 22:50:52 +0000 |
| commit | 3c9b5bbf7b98702a34d3c5336c62ef0c5eebec3a (patch) | |
| tree | 2a7d42b1a5c34976efedb58598526382b5e88d86 /Source/Core/VideoCommon/Src/BPStructs.cpp | |
| parent | eec7cba0af16c571839bc00d547038e4f3d5b9fc (diff) | |
Fixed the load-state memory leak, also fixed various other savestate issues. Found (probably) the cause of load-state crashing Dolphin: BPWrites. Tried to put a CriticalSection around BPWritten but it only causes Dolphin to hang when loading a state. Can someone find why it hangs?
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3873 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPStructs.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index e330e984cb..171bfc5147 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -27,15 +27,20 @@ #include "OpcodeDecoding.h" #include "VertexLoader.h" #include "VertexShaderManager.h" +#include "Thread.h" using namespace BPFunctions; +// FIXME: Hangs load-state, but should fix graphic-heavy games state loading +//Common::CriticalSection s_bpCritical; + void BPInit() { memset(&bpmem, 0, sizeof(bpmem)); bpmem.bpMask = 0xFFFFFF; } + // ---------------------------------------------------------------------------------------------------------- // Write to the Bypass Memory (Bypass Raster State Registers) /* ------------------ @@ -73,6 +78,9 @@ void BPWritten(const Bypass& bp) //default: break; //} + // FIXME: Hangs load-state, but should fix graphic-heavy games state loading + //s_bpCritical.Enter(); + FlushPipeline(); ((u32*)&bpmem)[bp.address] = bp.newvalue; @@ -605,10 +613,11 @@ void BPWritten(const Bypass& bp) default: WARN_LOG(VIDEO, "Unknown BP opcode: address = 0x%08x value = 0x%08x", bp.address, bp.newvalue); break; - } - - } - + } } + + // FIXME: Hangs load-state, but should fix graphic-heavy games state loading + //s_bpCritical.Leave(); +} } |
