zzogl-pg: remove negative AA. Save some cpu cycles.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3756 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2010-09-12 10:54:42 +00:00
parent 6b4d447c8d
commit 21fada2e53
6 changed files with 3 additions and 69 deletions

View File

@ -111,31 +111,6 @@ void ProcessWireFrame()
ZZLog::WriteToScreen(strtitle);
}
void ProcessNegAASetting(bool reverse)
{
FUNCLOG
char strtitle[256];
if (reverse)
{
conf.negaa--; // -1
if (conf.negaa > 2) conf.negaa = 2; // u8 in unsigned, so negative value is 255.
sprintf(strtitle, "down resolution - %s", s_naa[conf.negaa]);
ZeroGS::SetNegAA(conf.negaa);
}
else
{
conf.negaa++;
if (conf.negaa > 2) conf.negaa = 0;
sprintf(strtitle, "down resolution - %s", s_naa[conf.negaa]);
ZeroGS::SetNegAA(conf.negaa);
}
ZZLog::WriteToScreen(strtitle);
SaveConfig();
}
typedef struct GameHackStruct
{
const char HackName[40];

View File

@ -161,7 +161,6 @@ namespace ZeroGS
{
extern void AddMessage(const char* pstr, u32 ms);
extern void SetAA(int mode);
extern void SetNegAA(int mode);
extern bool Create(int width, int height);
extern void Destroy(bool bD3D);
extern void StartCapture();

View File

@ -200,7 +200,6 @@ VB vb[2];
float fiTexWidth[2], fiTexHeight[2]; // current tex width and height
u8 s_AAx = 0, s_AAy = 0; // if AAy is set, then AAx has to be set
u8 s_AAz = 0, s_AAw = 0; // if AAy is set, then AAx has to be set
int icurctx = -1;

View File

@ -199,24 +199,18 @@ extern CRenderTargetMngr s_RTs, s_DepthRTs;
extern CBitwiseTextureMngr s_BitwiseTextures;
extern CMemoryTargetMngr g_MemTargs;
extern u8 s_AAx, s_AAy, s_AAz, s_AAw;
extern u8 s_AAx, s_AAy;
// Real rendered width, depends on AA and AAneg.
inline int RW(int tbw)
{
if (s_AAx >= s_AAz)
return (tbw << (s_AAx - s_AAz));
else
return (tbw >> (s_AAz - s_AAx));
return (tbw << s_AAx);
}
// Real rendered height, depends on AA and AAneg.
inline int RH(int tbh)
{
if (s_AAy >= s_AAw)
return (tbh << (s_AAy - s_AAw));
else
return (tbh >> (s_AAw - s_AAy));
return (tbh << s_AAy);
}
/* inline void CreateTargetsList(int start, int end, list<ZeroGS::CRenderTarget*>& listTargs) {

View File

@ -404,38 +404,6 @@ void ZeroGS::ChangeDeviceSize(int nNewWidth, int nNewHeight)
assert(vb[0].pBufferData != NULL && vb[1].pBufferData != NULL);
}
void ZeroGS::SetNegAA(int mode)
{
FUNCLOG
// need to flush all targets
s_RTs.ResolveAll();
s_RTs.Destroy();
s_DepthRTs.ResolveAll();
s_DepthRTs.Destroy();
s_AAz = s_AAw = 0; // This is code for x0, x2, x4, x8 and x16 anti-aliasing.
if (mode > 0)
{
s_AAz = (mode + 1) / 2; // ( 1, 0 ) ; ( 1, 1 ) -- it's used as binary shift, so x << s_AAz, y << s_AAw
s_AAw = mode / 2;
}
memset(s_nResolveCounts, 0, sizeof(s_nResolveCounts));
s_nLastResolveReset = 0;
vb[0].prndr = NULL;
vb[0].pdepth = NULL;
vb[0].bNeedFrameCheck = 1;
vb[0].bNeedZCheck = 1;
vb[1].prndr = NULL;
vb[1].pdepth = NULL;
vb[1].bNeedFrameCheck = 1;
vb[1].bNeedZCheck = 1;
}
void ZeroGS::SetAA(int mode)
{
FUNCLOG

View File

@ -420,7 +420,6 @@ void ChangeWindowSize(int nNewWidth, int nNewHeight);
void SetChangeDeviceSize(int nNewWidth, int nNewHeight);
void ChangeDeviceSize(int nNewWidth, int nNewHeight);
void SetAA(int mode);
void SetNegAA(int mode);
void SetCRC(int crc);
void ReloadEffects();