gsdx-ogl-wnd:

* add a new config define ENABLE_OGL_MT_HACK to replace the define OGL_MT_HACK


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5511 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2013-01-14 09:25:16 +00:00
parent b65ad2c3e5
commit fb9c4e5a61
4 changed files with 11 additions and 10 deletions

View File

@ -10,7 +10,6 @@ endif(NOT TOP_CMAKE_WAS_SOURCED)
set(Output GSdx-0.1.16)
set(CommonFlags
-DOGL_MT_HACK
-D_LINUX
-fno-operator-names
-mpreferred-stack-boundary=2

View File

@ -57,7 +57,7 @@ extern bool RunLinuxDialog();
#define PS2E_X86 0x01 // 32 bit
#define PS2E_X86_64 0x02 // 64 bit
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
GSRenderer* s_gs = NULL;
#else
static GSRenderer* s_gs = NULL;
@ -457,7 +457,7 @@ EXPORT_C GSreadFIFO(uint8* mem)
{
try
{
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
// FIXME: double check which thread call this function
// See fifo2 issue below
#ifdef OGL_DEBUG
@ -468,7 +468,7 @@ EXPORT_C GSreadFIFO(uint8* mem)
s_gs->ReadFIFO(mem, 1);
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
s_gs->m_wnd->DetachContext();
#endif
}
@ -481,7 +481,7 @@ EXPORT_C GSreadFIFO2(uint8* mem, uint32 size)
{
try
{
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
// FIXME called from EE core thread not MTGS which cause
// invalidate data for opengl
#ifdef OGL_DEBUG
@ -492,7 +492,7 @@ EXPORT_C GSreadFIFO2(uint8* mem, uint32 size)
s_gs->ReadFIFO(mem, size);
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
s_gs->m_wnd->DetachContext();
#endif
}
@ -566,7 +566,7 @@ EXPORT_C GSvsync(int field)
#endif
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
s_gs->m_wnd->AttachContext();
#endif
s_gs->VSync(field);

View File

@ -23,7 +23,7 @@
#include "GSState.h"
#include "GSdx.h"
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
#include "GSRendererOGL.h"
extern GSRenderer* s_gs;
@ -1260,7 +1260,7 @@ void GSState::GIFRegHandlerTRXDIR(const GIFReg* RESTRICT r)
break;
case 1: // local -> host
m_tr.Init(m_env.TRXPOS.SSAX, m_env.TRXPOS.SSAY);
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
s_gs->m_wnd->DetachContext();
#endif
break;
@ -1767,7 +1767,7 @@ static hash_map<uint64, uint64> s_tags;
template<int index> void GSState::Transfer(const uint8* mem, uint32 size)
{
GSPerfMonAutoTimer pmat(&m_perfmon);
#ifdef OGL_MT_HACK
#ifdef ENABLE_OGL_MT_HACK
s_gs->m_wnd->AttachContext();
#endif

View File

@ -37,3 +37,5 @@
//#define DISABLE_COLCLAMP
//#define DISABLE_DATE
#define ENABLE_OGL_MT_HACK // OpenGL doesn't allow to access the same bound context from multiple threads. This hack changes context binding for GSreadFIFO* access