mirror of https://github.com/PCSX2/pcsx2.git
GSdx fix0red for GCC
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4316 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
3030166596
commit
6743959a3c
|
@ -1021,7 +1021,7 @@ const GSVector4i GPUDrawScanlineCodeGenerator::m_test[8] =
|
||||||
GSVector4i::zero(),
|
GSVector4i::zero(),
|
||||||
};
|
};
|
||||||
|
|
||||||
__declspec(align(16)) const uint16 GPUDrawScanlineCodeGenerator::m_dither[4][16] =
|
__aligned(const uint16, 32) GPUDrawScanlineCodeGenerator::m_dither[4][16] =
|
||||||
{
|
{
|
||||||
{7, 0, 6, 1, 7, 0, 6, 1, 7, 0, 6, 1, 7, 0, 6, 1},
|
{7, 0, 6, 1, 7, 0, 6, 1, 7, 0, 6, 1, 7, 0, 6, 1},
|
||||||
{2, 5, 3, 4, 2, 5, 3, 4, 2, 5, 3, 4, 2, 5, 3, 4},
|
{2, 5, 3, 4, 2, 5, 3, 4, 2, 5, 3, 4, 2, 5, 3, 4},
|
||||||
|
|
|
@ -24,15 +24,6 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GSRasterizer.h"
|
#include "GSRasterizer.h"
|
||||||
|
|
||||||
// Using a spinning finish on the main (MTGS) thread is apparently a big win still, over trying
|
|
||||||
// to wait out all the pending m_finished semaphores. It leaves one spinwait in the rasterizer,
|
|
||||||
// but that's still worlds better than 2-6 spinning threads like before.
|
|
||||||
|
|
||||||
// NOTE: spinning: 100-500 ticks, waiting: 1000-5000 ticks
|
|
||||||
|
|
||||||
//
|
|
||||||
#define UseSpinningFinish
|
|
||||||
|
|
||||||
// Set this to 1 to remove a lot of non-const div/modulus ops from the rasterization process.
|
// Set this to 1 to remove a lot of non-const div/modulus ops from the rasterization process.
|
||||||
// Might likely be a measurable speedup but limits threading to 1, 2, 4, and 8 threads.
|
// Might likely be a measurable speedup but limits threading to 1, 2, 4, and 8 threads.
|
||||||
// note by rama: Speedup is around 5% on average.
|
// note by rama: Speedup is around 5% on average.
|
||||||
|
@ -46,8 +37,6 @@
|
||||||
static const int ThreadMaskConst = ThreadsConst - 1;
|
static const int ThreadMaskConst = ThreadsConst - 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// align threads to page height (1 << 5)
|
|
||||||
|
|
||||||
#define THREAD_HEIGHT 5
|
#define THREAD_HEIGHT 5
|
||||||
|
|
||||||
GSRasterizer::GSRasterizer(IDrawScanline* ds)
|
GSRasterizer::GSRasterizer(IDrawScanline* ds)
|
||||||
|
@ -62,7 +51,7 @@ GSRasterizer::~GSRasterizer()
|
||||||
delete m_ds;
|
delete m_ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline bool GSRasterizer::IsOneOfMyScanlines(int scanline) const
|
bool GSRasterizer::IsOneOfMyScanlines(int scanline) const
|
||||||
{
|
{
|
||||||
#ifdef UseConstThreadCount
|
#ifdef UseConstThreadCount
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include "GSState.h"
|
#include "GSState.h"
|
||||||
#include "GSVertexTrace.h"
|
#include "GSVertexTrace.h"
|
||||||
#include "GSVertexList.h"
|
#include "GSVertexList.h"
|
||||||
//#include "GSSettingsDlg.h"
|
|
||||||
#include "GSCapture.h"
|
#include "GSCapture.h"
|
||||||
|
|
||||||
class GSRenderer : public GSState
|
class GSRenderer : public GSState
|
||||||
|
|
|
@ -136,7 +136,7 @@ protected:
|
||||||
VertexKickPtr m_vkf;
|
VertexKickPtr m_vkf;
|
||||||
|
|
||||||
#define InitVertexKick3(T, P, N, M) \
|
#define InitVertexKick3(T, P, N, M) \
|
||||||
m_vk[P][N][M] = (VertexKickPtr)&T::VertexKick<P, N, M>;
|
m_vk[P][N][M] = (VertexKickPtr)(void (T::*)(bool))&T::VertexKick<P, N, M>;
|
||||||
|
|
||||||
#define InitVertexKick2(T, P) \
|
#define InitVertexKick2(T, P) \
|
||||||
InitVertexKick3(T, P, 0, 0) \
|
InitVertexKick3(T, P, 0, 0) \
|
||||||
|
|
|
@ -821,7 +821,7 @@ GSTextureCache::Surface::Surface(GSRenderer* r)
|
||||||
, m_texture(NULL)
|
, m_texture(NULL)
|
||||||
, m_age(0)
|
, m_age(0)
|
||||||
{
|
{
|
||||||
m_TEX0.TBP0 = (uint32)~0;
|
m_TEX0.TBP0 = 0x3fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSTextureCache::Surface::~Surface()
|
GSTextureCache::Surface::~Surface()
|
||||||
|
|
|
@ -114,7 +114,7 @@ const GSTextureCacheSW::GSTexture* GSTextureCacheSW::Lookup(const GIFRegTEX0& TE
|
||||||
|
|
||||||
if(!t->Update(TEX0, TEXA, r))
|
if(!t->Update(TEX0, TEXA, r))
|
||||||
{
|
{
|
||||||
printf("!@#$%\n"); // memory allocation may fail if the game is too hungry
|
printf("!@#$\n"); // memory allocation may fail if the game is too hungry
|
||||||
|
|
||||||
RemoveAt(t);
|
RemoveAt(t);
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,12 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
#include "GSUtil.h"
|
#include "GSUtil.h"
|
||||||
#include "svnrev.h"
|
//#include "svnrev.h"
|
||||||
#include "xbyak/xbyak_util.h"
|
#include "xbyak/xbyak_util.h"
|
||||||
|
|
||||||
|
#define SVN_REV 0
|
||||||
|
#define SVN_MODS 0
|
||||||
|
|
||||||
char* GSUtil::GetLibName()
|
char* GSUtil::GetLibName()
|
||||||
{
|
{
|
||||||
static string str;
|
static string str;
|
||||||
|
|
|
@ -102,6 +102,14 @@ using namespace stdext;
|
||||||
#define EXPORT_C_(type) extern "C" type
|
#define EXPORT_C_(type) extern "C" type
|
||||||
#define EXPORT_C EXPORT_C_(void)
|
#define EXPORT_C EXPORT_C_(void)
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
|
||||||
|
// #define __forceinline __attribute__((always_inline,unused))
|
||||||
|
#define __forceinline __inline__ __attribute__((__always_inline__,__gnu_inline__))
|
||||||
|
#define __assume(c) ((void)0)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern string format(const char* fmt, ...);
|
extern string format(const char* fmt, ...);
|
||||||
|
@ -279,6 +287,23 @@ __forceinline unsigned char _interlockedbittestandreset(volatile long* a, const
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
|
||||||
|
__forceinline unsigned long long __rdtsc()
|
||||||
|
{
|
||||||
|
#if defined(__amd64__) || defined(__x86_64__)
|
||||||
|
unsigned long long low, high;
|
||||||
|
__asm__ __volatile__("rdtsc" : "=a"(low), "=d"(high));
|
||||||
|
return low | (high << 32);
|
||||||
|
#else
|
||||||
|
unsigned long long retval;
|
||||||
|
__asm__ __volatile__("rdtsc" : "=A"(retval));
|
||||||
|
return retval;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void* vmalloc(size_t size, bool code);
|
extern void* vmalloc(size_t size, bool code);
|
||||||
|
|
Loading…
Reference in New Issue