mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
b65ad2c3e5
commit
fb9c4e5a61
|
@ -10,7 +10,6 @@ endif(NOT TOP_CMAKE_WAS_SOURCED)
|
||||||
set(Output GSdx-0.1.16)
|
set(Output GSdx-0.1.16)
|
||||||
|
|
||||||
set(CommonFlags
|
set(CommonFlags
|
||||||
-DOGL_MT_HACK
|
|
||||||
-D_LINUX
|
-D_LINUX
|
||||||
-fno-operator-names
|
-fno-operator-names
|
||||||
-mpreferred-stack-boundary=2
|
-mpreferred-stack-boundary=2
|
||||||
|
|
|
@ -57,7 +57,7 @@ extern bool RunLinuxDialog();
|
||||||
#define PS2E_X86 0x01 // 32 bit
|
#define PS2E_X86 0x01 // 32 bit
|
||||||
#define PS2E_X86_64 0x02 // 64 bit
|
#define PS2E_X86_64 0x02 // 64 bit
|
||||||
|
|
||||||
#ifdef OGL_MT_HACK
|
#ifdef ENABLE_OGL_MT_HACK
|
||||||
GSRenderer* s_gs = NULL;
|
GSRenderer* s_gs = NULL;
|
||||||
#else
|
#else
|
||||||
static GSRenderer* s_gs = NULL;
|
static GSRenderer* s_gs = NULL;
|
||||||
|
@ -457,7 +457,7 @@ EXPORT_C GSreadFIFO(uint8* mem)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#ifdef OGL_MT_HACK
|
#ifdef ENABLE_OGL_MT_HACK
|
||||||
// FIXME: double check which thread call this function
|
// FIXME: double check which thread call this function
|
||||||
// See fifo2 issue below
|
// See fifo2 issue below
|
||||||
#ifdef OGL_DEBUG
|
#ifdef OGL_DEBUG
|
||||||
|
@ -468,7 +468,7 @@ EXPORT_C GSreadFIFO(uint8* mem)
|
||||||
|
|
||||||
s_gs->ReadFIFO(mem, 1);
|
s_gs->ReadFIFO(mem, 1);
|
||||||
|
|
||||||
#ifdef OGL_MT_HACK
|
#ifdef ENABLE_OGL_MT_HACK
|
||||||
s_gs->m_wnd->DetachContext();
|
s_gs->m_wnd->DetachContext();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -481,7 +481,7 @@ EXPORT_C GSreadFIFO2(uint8* mem, uint32 size)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#ifdef OGL_MT_HACK
|
#ifdef ENABLE_OGL_MT_HACK
|
||||||
// FIXME called from EE core thread not MTGS which cause
|
// FIXME called from EE core thread not MTGS which cause
|
||||||
// invalidate data for opengl
|
// invalidate data for opengl
|
||||||
#ifdef OGL_DEBUG
|
#ifdef OGL_DEBUG
|
||||||
|
@ -492,7 +492,7 @@ EXPORT_C GSreadFIFO2(uint8* mem, uint32 size)
|
||||||
|
|
||||||
s_gs->ReadFIFO(mem, size);
|
s_gs->ReadFIFO(mem, size);
|
||||||
|
|
||||||
#ifdef OGL_MT_HACK
|
#ifdef ENABLE_OGL_MT_HACK
|
||||||
s_gs->m_wnd->DetachContext();
|
s_gs->m_wnd->DetachContext();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -566,7 +566,7 @@ EXPORT_C GSvsync(int field)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OGL_MT_HACK
|
#ifdef ENABLE_OGL_MT_HACK
|
||||||
s_gs->m_wnd->AttachContext();
|
s_gs->m_wnd->AttachContext();
|
||||||
#endif
|
#endif
|
||||||
s_gs->VSync(field);
|
s_gs->VSync(field);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "GSState.h"
|
#include "GSState.h"
|
||||||
#include "GSdx.h"
|
#include "GSdx.h"
|
||||||
|
|
||||||
#ifdef OGL_MT_HACK
|
#ifdef ENABLE_OGL_MT_HACK
|
||||||
|
|
||||||
#include "GSRendererOGL.h"
|
#include "GSRendererOGL.h"
|
||||||
extern GSRenderer* s_gs;
|
extern GSRenderer* s_gs;
|
||||||
|
@ -1260,7 +1260,7 @@ void GSState::GIFRegHandlerTRXDIR(const GIFReg* RESTRICT r)
|
||||||
break;
|
break;
|
||||||
case 1: // local -> host
|
case 1: // local -> host
|
||||||
m_tr.Init(m_env.TRXPOS.SSAX, m_env.TRXPOS.SSAY);
|
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();
|
s_gs->m_wnd->DetachContext();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -1767,7 +1767,7 @@ static hash_map<uint64, uint64> s_tags;
|
||||||
template<int index> void GSState::Transfer(const uint8* mem, uint32 size)
|
template<int index> void GSState::Transfer(const uint8* mem, uint32 size)
|
||||||
{
|
{
|
||||||
GSPerfMonAutoTimer pmat(&m_perfmon);
|
GSPerfMonAutoTimer pmat(&m_perfmon);
|
||||||
#ifdef OGL_MT_HACK
|
#ifdef ENABLE_OGL_MT_HACK
|
||||||
s_gs->m_wnd->AttachContext();
|
s_gs->m_wnd->AttachContext();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -37,3 +37,5 @@
|
||||||
//#define DISABLE_COLCLAMP
|
//#define DISABLE_COLCLAMP
|
||||||
|
|
||||||
//#define DISABLE_DATE
|
//#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
|
||||||
|
|
Loading…
Reference in New Issue