From 2049caa9fc714ea3b008d69d3aa8c37e1d7f4482 Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Tue, 9 Mar 2010 21:15:28 +0000 Subject: [PATCH] Fix NoWX build, use a different define in CoreParameter, the one we all know and love, and add a Function call to VertexManager which can boost performance, tells the drivers that we don't care about the current data, because we are putting new data in it anyway. This gives quite a performance boost on OSX since it bypasses a call in the drivers that takes around 24% CPU time git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5179 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/CoreParameter.cpp | 2 +- Source/Core/DolphinWX/Src/MainNoGUI.cpp | 1 - Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index 21816d42f9..b777a54ae0 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -87,7 +87,7 @@ void SCoreStartupParameter::LoadDefaults() // These are required for the JIT cores to work in OSX // Older revs (~4854) Only required LoadStorePaired to be turned off // Newer revs (~4890) require both turned off - #ifdef __x86_64__ + #ifdef _M_X64 // These work fine in 32bit OSX // Since the reason why 64bit OSX fails out is due to casting (u32)(u64) // Since all 64bit applications are above the 32bit memory boundary diff --git a/Source/Core/DolphinWX/Src/MainNoGUI.cpp b/Source/Core/DolphinWX/Src/MainNoGUI.cpp index 344cd4e1db..db88855145 100644 --- a/Source/Core/DolphinWX/Src/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/Src/MainNoGUI.cpp @@ -230,7 +230,6 @@ int main(int argc, char* argv[]) std::string bootFile(args_info.inputs[0]); updateMainFrameEvent.Init(); - cpu_info.Detect(); LogManager::Init(); EventHandler::Init(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp index 216aee47d6..a6e7745e7c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp @@ -222,6 +222,7 @@ void Flush() glBindBuffer(GL_ARRAY_BUFFER, s_vboBuffers[s_nCurVBOIndex]); + glBufferData(GL_ARRAY_BUFFER, s_pCurBufferPointer - LocalVBuffer, NULL, GL_STREAM_COPY); glBufferSubData(GL_ARRAY_BUFFER,0, s_pCurBufferPointer - LocalVBuffer, LocalVBuffer); GL_REPORT_ERRORD();