mirror of https://github.com/PCSX2/pcsx2.git
GSdx: gcc build runs, and judging by the frame rate it may even draw something.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4321 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
052cd4d45e
commit
d4b300a8ac
|
@ -44,7 +44,7 @@ EXPORT_C_(uint32) PSEgetLibType()
|
|||
return PSE_LT_GPU;
|
||||
}
|
||||
|
||||
EXPORT_C_(char*) PSEgetLibName()
|
||||
EXPORT_C_(const char*) PSEgetLibName()
|
||||
{
|
||||
return GSUtil::GetLibName();
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ EXPORT_C_(uint32) PS2EgetLibType()
|
|||
return PS2E_LT_GS;
|
||||
}
|
||||
|
||||
EXPORT_C_(char*) PS2EgetLibName()
|
||||
EXPORT_C_(const char*) PS2EgetLibName()
|
||||
{
|
||||
return GSUtil::GetLibName();
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
|||
case 0: case 1: case 2: dev = new GSDevice9(); break;
|
||||
case 3: case 4: case 5: dev = new GSDevice11(); break;
|
||||
#endif
|
||||
case 12: case 13: new GSDeviceNull(); break;
|
||||
case 12: case 13: dev = new GSDeviceNull(); break;
|
||||
}
|
||||
|
||||
if(dev == NULL)
|
||||
|
@ -214,10 +214,10 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
|||
case 3:
|
||||
s_gs = new GSRendererDX11();
|
||||
break;
|
||||
#endif
|
||||
case 1: case 4: case 7: case 10: case 12:
|
||||
s_gs = new GSRendererSW(threads);
|
||||
break;
|
||||
#endif
|
||||
case 2: case 5: case 8: case 11: case 13:
|
||||
s_gs = new GSRendererNull();
|
||||
break;
|
||||
|
@ -542,6 +542,8 @@ EXPORT_C GSgetTitleInfo2(char* dest, size_t length)
|
|||
{
|
||||
string s = "GSdx";
|
||||
|
||||
if(s_gs != NULL) // TODO: this gets called from a different thread concurrently with GSOpen (on linux)
|
||||
|
||||
if(s_gs->m_GStitleInfoBuffer[0])
|
||||
{
|
||||
GSAutoLock lock(&s_gs->m_pGSsetTitle_Crit);
|
||||
|
|
|
@ -22,19 +22,29 @@
|
|||
#include "stdafx.h"
|
||||
#include "GS.h"
|
||||
#include "GSUtil.h"
|
||||
//#include "svnrev.h"
|
||||
#include "xbyak/xbyak_util.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include "svnrev.h"
|
||||
#else
|
||||
#define SVN_REV 0
|
||||
#define SVN_MODS 0
|
||||
#endif
|
||||
|
||||
char* GSUtil::GetLibName()
|
||||
const char* GSUtil::GetLibName()
|
||||
{
|
||||
// TODO: critsec
|
||||
|
||||
static string str;
|
||||
|
||||
str = format("GSdx %d", SVN_REV);
|
||||
if(str.empty())
|
||||
{
|
||||
str = "GSdx";
|
||||
|
||||
#ifdef _WINDOWS
|
||||
str += format(" %d", SVN_REV);
|
||||
if(SVN_MODS) str += "m";
|
||||
#endif
|
||||
|
||||
#if _M_AMD64
|
||||
str += " 64-bit";
|
||||
|
@ -48,6 +58,8 @@ char* GSUtil::GetLibName()
|
|||
sl.push_back(format("Intel C++ %d.%02d", __INTEL_COMPILER / 100, __INTEL_COMPILER % 100));
|
||||
#elif _MSC_VER
|
||||
sl.push_back(format("MSVC %d.%02d", _MSC_VER / 100, _MSC_VER % 100));
|
||||
#elif __GNUC__
|
||||
sl.push_back(format("GCC %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__));
|
||||
#endif
|
||||
|
||||
#if _M_SSE >= 0x500
|
||||
|
@ -70,8 +82,9 @@ char* GSUtil::GetLibName()
|
|||
str += *i;
|
||||
str += ++i != sl.end() ? ", " : ")";
|
||||
}
|
||||
}
|
||||
|
||||
return (char*)str.c_str();
|
||||
return str.c_str();
|
||||
}
|
||||
|
||||
static class GSUtilMaps
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
class GSUtil
|
||||
{
|
||||
public:
|
||||
static char* GetLibName();
|
||||
static const char* GetLibName();
|
||||
|
||||
static GS_PRIM_CLASS GetPrimClass(uint32 prim);
|
||||
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="bin/Debug/libGSdx" prefix_auto="1" extension_auto="1" />
|
||||
<Option output="../../bin/plugins/libGSdx" prefix_auto="1" extension_auto="1" />
|
||||
<Option working_dir="../../bin" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="3" />
|
||||
<Option compiler="gcc" />
|
||||
<Option host_application="../../pcsx2/bin/pcsx2" />
|
||||
<Option createDefFile="1" />
|
||||
<Option createStaticLib="1" />
|
||||
<Compiler>
|
||||
|
@ -18,10 +20,12 @@
|
|||
</Compiler>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="bin/Release/libGSdx" prefix_auto="1" extension_auto="1" />
|
||||
<Option output="../../bin/plugins/libGSdx" prefix_auto="1" extension_auto="1" />
|
||||
<Option working_dir="../../bin" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="3" />
|
||||
<Option compiler="gcc" />
|
||||
<Option host_application="../../pcsx2/bin/pcsx2" />
|
||||
<Option createDefFile="1" />
|
||||
<Option createStaticLib="1" />
|
||||
<Compiler>
|
||||
|
@ -30,10 +34,15 @@
|
|||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-march=pentium4" />
|
||||
<Add option="-fno-operator-names" />
|
||||
<Add option="-msse2" />
|
||||
<Add option="-m32" />
|
||||
<Add option="-mpreferred-stack-boundary=2" />
|
||||
<Add option="-D_LINUX" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-lpthread" />
|
||||
</Linker>
|
||||
<Unit filename="GPU.cpp" />
|
||||
<Unit filename="GPU.h" />
|
||||
<Unit filename="GPUDrawScanline.cpp" />
|
||||
|
@ -139,7 +148,11 @@
|
|||
<envvars />
|
||||
<code_completion />
|
||||
<lib_finder disable_auto="1" />
|
||||
<debugger />
|
||||
<debugger>
|
||||
<remote_debugging>
|
||||
<options conn_type="0" serial_baud="115200" additional_cmds_before="handle SIGSEGV nostop" />
|
||||
</remote_debugging>
|
||||
</debugger>
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
||||
|
|
|
@ -104,8 +104,8 @@ using namespace stdext;
|
|||
|
||||
#ifdef __GNUC__
|
||||
|
||||
// #define __forceinline __attribute__((always_inline,unused))
|
||||
#define __forceinline __inline__ __attribute__((__always_inline__,__gnu_inline__))
|
||||
#define __forceinline __inline__ __attribute__((always_inline,unused))
|
||||
// #define __forceinline __inline__ __attribute__((__always_inline__,__gnu_inline__))
|
||||
#define __assume(c) ((void)0)
|
||||
|
||||
#endif
|
||||
|
@ -156,7 +156,7 @@ typedef signed long long int64;
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(_DEBUG) && defined(_MSC_VER)
|
||||
#if defined(_DEBUG) //&& defined(_MSC_VER)
|
||||
|
||||
#include <assert.h>
|
||||
#define ASSERT assert
|
||||
|
|
Loading…
Reference in New Issue