zzogl-pg: Fix various compiler warnings, and one or two things I missed earlier.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2750 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-03-19 06:38:44 +00:00
parent dfeb416833
commit df401326aa
17 changed files with 140 additions and 149 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="pcsx2_suite_2008 workspace">
<Project filename="pcsx2/Linux/pcsx2.cbp">
<Project filename="pcsx2/Linux/pcsx2.cbp" active="1">
<Depends filename="common/build/x86emitter/x86emitter.cbp" />
<Depends filename="common/build/Utilities/Utilities.cbp" />
<Depends filename="3rdparty/zlib/zlib.cbp" />
@ -30,6 +30,6 @@
<Project filename="plugins/zerospu2/Linux/ZeroSPU2.cbp">
<Depends filename="3rdparty/SoundTouch/SoundTouch.cbp" />
</Project>
<Project filename="plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp" active="1" />
<Project filename="plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp" />
</Workspace>
</CodeBlocks_workspace_file>

View File

@ -35,26 +35,27 @@ bool GLWindow::CreateWindow(void *pDisplay)
bool GLWindow::ReleaseWindow()
{
if (context)
{
if (!glXMakeCurrent(glDisplay, None, NULL))
{
ERROR_LOG("Could not release drawing context.\n");
}
if (context)
{
if (!glXMakeCurrent(glDisplay, None, NULL))
{
ERROR_LOG("Could not release drawing context.\n");
}
glXDestroyContext(glDisplay, context);
context = NULL;
}
glXDestroyContext(glDisplay, context);
context = NULL;
}
/* switch back to original desktop resolution if we were in fullScreen */
if ( glDisplay != NULL )
{
if (fullScreen)
{
XF86VidModeSwitchToMode(glDisplay, glScreen, &deskMode);
XF86VidModeSetViewPort(glDisplay, glScreen, 0, 0);
}
}
/* switch back to original desktop resolution if we were in fullscreen */
if ( glDisplay != NULL )
{
if (fullScreen)
{
XF86VidModeSwitchToMode(glDisplay, glScreen, &deskMode);
XF86VidModeSetViewPort(glDisplay, glScreen, 0, 0);
}
}
return true;
}
void GLWindow::CloseWindow()
@ -98,32 +99,36 @@ bool GLWindow::DisplayWindow(int _width, int _height)
GLWin.fullScreen = !!(conf.options & GSOPTION_FULLSCREEN);
/* get an appropriate visual */
vi = glXChooseVisual(GLWin.glDisplay, GLWin.glScreen, attrListDbl);
if (vi == NULL) {
vi = glXChooseVisual(GLWin.glDisplay, GLWin.glScreen, attrListSgl);
GLWin.doubleBuffered = False;
vi = glXChooseVisual(glDisplay, glScreen, attrListDbl);
if (vi == NULL)
{
vi = glXChooseVisual(glDisplay, glScreen, attrListSgl);
doubleBuffered = false;
ERROR_LOG("Only Singlebuffered Visual!\n");
}
else {
GLWin.doubleBuffered = True;
else
{
doubleBuffered = true;
ERROR_LOG("Got Doublebuffered Visual!\n");
}
glXQueryVersion(GLWin.glDisplay, &glxMajorVersion, &glxMinorVersion);
glXQueryVersion(glDisplay, &glxMajorVersion, &glxMinorVersion);
ERROR_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
/* create a GLX context */
GLWin.context = glXCreateContext(GLWin.glDisplay, vi, 0, GL_TRUE);
context = glXCreateContext(glDisplay, vi, 0, GL_TRUE);
/* create a color map */
cmap = XCreateColormap(GLWin.glDisplay, RootWindow(GLWin.glDisplay, vi->screen),
cmap = XCreateColormap(glDisplay, RootWindow(glDisplay, vi->screen),
vi->visual, AllocNone);
GLWin.attr.colormap = cmap;
GLWin.attr.border_pixel = 0;
attr.colormap = cmap;
attr.border_pixel = 0;
// get a connection
XF86VidModeQueryVersion(GLWin.glDisplay, &vidModeMajorVersion, &vidModeMinorVersion);
if (GLWin.fullScreen) {
XF86VidModeQueryVersion(glDisplay, &vidModeMajorVersion, &vidModeMinorVersion);
if (fullScreen)
{
XF86VidModeModeInfo **modes = NULL;
int modeNum = 0;
int bestMode = 0;
@ -131,81 +136,78 @@ bool GLWindow::DisplayWindow(int _width, int _height)
// set best mode to current
bestMode = 0;
ERROR_LOG("XF86VidModeExtension-Version %d.%d\n", vidModeMajorVersion, vidModeMinorVersion);
XF86VidModeGetAllModeLines(GLWin.glDisplay, GLWin.glScreen, &modeNum, &modes);
XF86VidModeGetAllModeLines(glDisplay, glScreen, &modeNum, &modes);
if( modeNum > 0 && modes != NULL ) {
if( modeNum > 0 && modes != NULL )
{
/* save desktop-resolution before switching modes */
GLWin.deskMode = *modes[0];
deskMode = *modes[0];
/* look for mode with requested resolution */
for (i = 0; i < modeNum; i++) {
if ((modes[i]->hdisplay == _width) && (modes[i]->vdisplay == _height)) {
for (i = 0; i < modeNum; i++)
{
if ((modes[i]->hdisplay == _width) && (modes[i]->vdisplay == _height))
{
bestMode = i;
}
}
XF86VidModeSwitchToMode(GLWin.glDisplay, GLWin.glScreen, modes[bestMode]);
XF86VidModeSetViewPort(GLWin.glDisplay, GLWin.glScreen, 0, 0);
XF86VidModeSwitchToMode(glDisplay, glScreen, modes[bestMode]);
XF86VidModeSetViewPort(glDisplay, glScreen, 0, 0);
dpyWidth = modes[bestMode]->hdisplay;
dpyHeight = modes[bestMode]->vdisplay;
ERROR_LOG("Resolution %dx%d\n", dpyWidth, dpyHeight);
XFree(modes);
/* create a fullscreen window */
GLWin.attr.override_redirect = True;
GLWin.attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask |
StructureNotifyMask;
GLWin.glWindow = XCreateWindow(GLWin.glDisplay, RootWindow(GLWin.glDisplay, vi->screen),
attr.override_redirect = True;
attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask | StructureNotifyMask;
glWindow = XCreateWindow(glDisplay, RootWindow(glDisplay, vi->screen),
0, 0, dpyWidth, dpyHeight, 0, vi->depth, InputOutput, vi->visual,
CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect,
&GLWin.attr);
XWarpPointer(GLWin.glDisplay, None, GLWin.glWindow, 0, 0, 0, 0, 0, 0);
XMapRaised(GLWin.glDisplay, GLWin.glWindow);
XGrabKeyboard(GLWin.glDisplay, GLWin.glWindow, True, GrabModeAsync,
GrabModeAsync, CurrentTime);
XGrabPointer(GLWin.glDisplay, GLWin.glWindow, True, ButtonPressMask,
GrabModeAsync, GrabModeAsync, GLWin.glWindow, None, CurrentTime);
&attr);
XWarpPointer(glDisplay, None, glWindow, 0, 0, 0, 0, 0, 0);
XMapRaised(glDisplay, glWindow);
XGrabKeyboard(glDisplay, glWindow, True, GrabModeAsync, GrabModeAsync, CurrentTime);
XGrabPointer(glDisplay, glWindow, True, ButtonPressMask, GrabModeAsync, GrabModeAsync, glWindow, None, CurrentTime);
}
else {
else
{
ERROR_LOG("Failed to start fullscreen. If you received the \n"
"\"XFree86-VidModeExtension\" extension is missing, add\n"
"Load \"extmod\"\n"
"to your X configuration file (under the Module Section)\n");
GLWin.fullScreen = false;
fullScreen = false;
}
}
if( !GLWin.fullScreen ) {
//XRootWindow(dpy,screen)
//int X = (rcdesktop.right-rcdesktop.left)/2 - (rc.right-rc.left)/2;
//int Y = (rcdesktop.bottom-rcdesktop.top)/2 - (rc.bottom-rc.top)/2;
if (!fullScreen)
{
// create a window in window mode
GLWin.attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask |
StructureNotifyMask;
GLWin.glWindow = XCreateWindow(GLWin.glDisplay, RootWindow(GLWin.glDisplay, vi->screen),
attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask | StructureNotifyMask;
glWindow = XCreateWindow(glDisplay, RootWindow(glDisplay, vi->screen),
0, 0, _width, _height, 0, vi->depth, InputOutput, vi->visual,
CWBorderPixel | CWColormap | CWEventMask, &GLWin.attr);
CWBorderPixel | CWColormap | CWEventMask, &attr);
// only set window title and handle wm_delete_events if in windowed mode
wmDelete = XInternAtom(GLWin.glDisplay, "WM_DELETE_WINDOW", True);
XSetWMProtocols(GLWin.glDisplay, GLWin.glWindow, &wmDelete, 1);
XSetStandardProperties(GLWin.glDisplay, GLWin.glWindow, "ZZOgl-PG",
"ZZOgl-PG", None, NULL, 0, NULL);
XMapRaised(GLWin.glDisplay, GLWin.glWindow);
wmDelete = XInternAtom(glDisplay, "WM_DELETE_WINDOW", True);
XSetWMProtocols(glDisplay, glWindow, &wmDelete, 1);
XSetStandardProperties(glDisplay, glWindow, "ZZOgl-PG", "ZZOgl-PG", None, NULL, 0, NULL);
XMapRaised(glDisplay, glWindow);
}
// connect the glx-context to the window
glXMakeCurrent(GLWin.glDisplay, GLWin.glWindow, GLWin.context);
XGetGeometry(GLWin.glDisplay, GLWin.glWindow, &winDummy, &GLWin.x, &GLWin.y,
&GLWin.width, &GLWin.height, &borderDummy, &GLWin.depth);
ERROR_LOG("Depth %d\n", GLWin.depth);
if (glXIsDirect(GLWin.glDisplay, GLWin.context))
glXMakeCurrent(glDisplay, glWindow, context);
XGetGeometry(glDisplay, glWindow, &winDummy, &x, &y, &width, &height, &borderDummy, &depth);
ERROR_LOG("Depth %d\n", depth);
if (glXIsDirect(glDisplay, context))
ERROR_LOG("you have Direct Rendering!\n");
else
ERROR_LOG("no Direct Rendering possible!\n");
// better for pad plugin key input (thc)
XSelectInput(GLWin.glDisplay, GLWin.glWindow, ExposureMask | KeyPressMask | KeyReleaseMask |
XSelectInput(glDisplay, glWindow, ExposureMask | KeyPressMask | KeyReleaseMask |
ButtonPressMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask |
FocusChangeMask );

View File

@ -210,10 +210,18 @@ struct Vector_16F
#endif
#define ERROR_LOG __LogToConsole
//Logging for oftenly calling error should have time counter.
static unsigned long int lasttime = 0;
static unsigned long int BigTime = 5000;
//Logging for errors that are called often should have a time counter.
#ifdef __LINUX__
static u32 __attribute__((unused)) lasttime = 0;
static u32 __attribute__((unused)) BigTime = 5000;
static bool __attribute__((unused)) SPAM_PASS;
#else
static u32 lasttime = 0;
static u32 BigTime = 5000;
static bool SPAM_PASS;
#endif
#define ERROR_LOG_SPAM(text) { \
if( timeGetTime() - lasttime > BigTime ) { \
ERROR_LOG(text); \
@ -489,13 +497,8 @@ extern u8* g_pBasePS2Mem;
//
// sps2tags.h
//
#ifdef _M_AMD64
#define GET_GIF_REG(tag, reg) \
(((tag).ai64[1] >> ((reg) << 2)) & 0xf)
#else
#define GET_GIF_REG(tag, reg) \
(((tag).ai32[2 + ((reg) >> 3)] >> (((reg) & 7) << 2)) & 0xf)
#endif
//
// GIFTag
@ -543,26 +546,17 @@ typedef struct {
#define GSOPTION_LOADED 0x8000
//Configuration values.
typedef struct {
// write color in render target
u8 mrtdepth;
// intelacing mode 0, 1, 3-off
u8 interlace;
// antialiasing 0 - off, 1 - 2x, 2 - 4x, 3 - 8x, 4 - 16x
u8 aa;
// negative aliasing
u8 negaa;
// set to enable bilinear support. 0 - off, 1 -- on, 2 -- force (use it to textures,
// that usually does neet billinear
u8 bilinear;
// game options -- diffetent hacks.
u32 options;
// default game settings
u32 gamesettings;
// View target size, have no impact to speed
int width, height;
// Widescreen support
bool isWideScreen;
typedef struct
{
u8 mrtdepth; // write color in render target
u8 interlace; // intelacing mode 0, 1, 3-off
u8 aa; // antialiasing 0 - off, 1 - 2x, 2 - 4x, 3 - 8x, 4 - 16x
u8 negaa; // negative aliasing
u8 bilinear; // set to enable bilinear support. 0 - off, 1 -- on, 2 -- force (use for textures that usually need it)
u32 options; // game options -- different hacks.
u32 gamesettings;// default game settings
int width, height; // View target size, has no impact towards speed
bool isWideScreen; // Widescreen support
#ifdef GS_LOG
u32 log;
#endif

View File

@ -283,12 +283,15 @@ void CALLBACK GSgifTransfer3(u32 *pMem, u32 size)
_GSgifTransfer(&gs.path3, pMem, size);
}
#ifdef _DEBUG
static int count = 0;
#endif
void CALLBACK GSgifTransfer1(u32 *pMem, u32 addr)
{
FUNCLOG
pathInfo *path = &gs.path1;
//pathInfo *path = &gs.path1;
//GS_LOG("GSgifTransfer1 0x%x (mode %d)\n", addr, path->mode);

View File

@ -46,8 +46,6 @@ void SaveConfig()
void LoadConfig()
{
char cfg[255];
memset(&conf, 0, sizeof(conf));
conf.interlace = 0; // on, mode 1
conf.mrtdepth = 1;

View File

@ -93,14 +93,10 @@ void CALLBACK GSkeyEvent(keyEvent *ev)
void OnConf_Ok(GtkButton *button, gpointer user_data)
{
GtkWidget *Btn;
GtkWidget *treeview;
GtkTreeModel *treemodel;
GtkTreeIter treeiter;
gboolean treeoptval;
gchar *gbuf;
char *str;
int i;
conf.bilinear = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkBilinear")));
// restore
@ -177,9 +173,7 @@ void OnConf_Cancel(GtkButton *button, gpointer user_data)
void CALLBACK GSconfigure()
{
char name[32];
char descbuf[255];
int nmodes, i;
bool itval;
GtkWidget *treeview;
GtkCellRenderer *treerend;

View File

@ -248,7 +248,7 @@ static PCSX2_ALIGNED16(u32 tempblock[64]);
assert( gs.imageTransfer == 0 ); \
u8* pstart = g_pbyGSMemory + gs.dstbuf.bp*256; \
\
const u8* pendbuf = (const u8*)pbyMem + nQWordSize*4; \
/*const u8* pendbuf = (const u8*)pbyMem + nQWordSize*4;*/ \
int i = gs.imageY, j = gs.imageX; \
#define END_HOSTLOCAL() \

View File

@ -993,7 +993,6 @@ void __fastcall GIFRegHandlerTRXDIR(u32* data)
}
}
static u32 oldhw[4];
void __fastcall GIFRegHandlerHWREG(u32* data)
{
FUNCLOG

View File

@ -263,8 +263,9 @@ inline void RenderStartHelper(u32 bInterlace){
glViewport(0, 0, nBackbufferWidth, nBackbufferHeight);
// if interlace, only clear every other vsync
if(!bInterlace ) {
u32 color = COLOR_ARGB(0, BGCOLOR->R, BGCOLOR->G, BGCOLOR->B);
if(!bInterlace )
{
//u32 color = COLOR_ARGB(0, BGCOLOR->R, BGCOLOR->G, BGCOLOR->B);
glClear(GL_COLOR_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);
}

View File

@ -398,6 +398,9 @@ inline bool CreateFillExtensionsMap(){
return true;
}
const static char* g_pShaders[] = { "full", "reduced", "accurate", "accurate-reduced" };
bool ZeroGS::Create(int _width, int _height)
{
GLenum err = GL_NO_ERROR;

View File

@ -780,7 +780,7 @@ inline Vector FlushTextureDims(FRAGMENTSHADER* pfragment, int shadertype, VB& cu
vTexDims.w = 0;//0.2f/(float)ptextarg->fbh;
}
else {
u32 tbp0 = curvb.tex0.tbp0 >> 5; // align to a page
//u32 tbp0 = curvb.tex0.tbp0 >> 5; // align to a page
int blockheight = PSMT_ISHALF(ptextarg->psm) ? 64 : 32;
int ycoord = ((curvb.tex0.tbp0 - ptextarg->fbp) / (32 * (ptextarg->fbw >> 6))) * blockheight;
int xcoord = (((curvb.tex0.tbp0 - ptextarg->fbp) % (32 * (ptextarg -> fbw >> 6)))) * 2;
@ -822,7 +822,7 @@ inline FRAGMENTSHADER* FlushUseExistRenderTaget(VB& curvb, CRenderTarget* ptexta
SetWriteDepth();
GLuint ptexclut = 0;
int psm = GetTexCPSM(curvb.tex0);
//int psm = GetTexCPSM(curvb.tex0);
int shadertype = FlushGetShaderType(curvb, ptextarg, ptexclut);
FRAGMENTSHADER* pfragment = LoadShadeEffect(shadertype, 0, curvb.curprim.fge,
@ -852,7 +852,7 @@ inline FRAGMENTSHADER* FlushMadeNewTarget(VB& curvb, int exactcolor, int context
if( g_bSaveTex ) {
if( g_bSaveTex == 1 ) {
SaveTex(&curvb.tex0, 1);
CMemoryTarget* pmemtarg = g_MemTargs.GetMemoryTarget(curvb.tex0, 0);
/*CMemoryTarget* pmemtarg = */g_MemTargs.GetMemoryTarget(curvb.tex0, 0);
}
else SaveTex(&curvb.tex0, 0);
}
@ -1817,8 +1817,8 @@ void ZeroGS::SetTexVariables(int context, FRAGMENTSHADER* pfragment ) {
Vector v, v2;
tex0Info& tex0 = vb[context].tex0;
float fw = (float)tex0.tw;
float fh = (float)tex0.th;
//float fw = (float)tex0.tw;
//float fh = (float)tex0.th;
if( !vb[context].bTexConstsSync ) {
SetShaderCaller("SetTexVariables");
@ -2024,11 +2024,11 @@ void ZeroGS::SetTexVariablesInt(int context, int bilinear, const tex0Info& tex0,
}
float g_fitexwidth = g_fiGPU_TEXWIDTH/(float)pmemtarg->widthmult;
float g_texwidth = GPU_TEXWIDTH*(float)pmemtarg->widthmult;
//float g_texwidth = GPU_TEXWIDTH*(float)pmemtarg->widthmult;
float fpage = tex0.tbp0*(64.0f*g_fitexwidth);// + 0.05f * g_fitexwidth;
float fpageint = floorf(fpage);
int starttbp = (int)fpage;
//int starttbp = (int)fpage;
// 2048 is number of words to span one page
//float fblockstride = (2048.0f /(float)(g_texwidth*BLOCK_TEXWIDTH)) * b.vTexDims.x * fbw;
@ -2053,7 +2053,7 @@ void ZeroGS::SetTexVariablesInt(int context, int bilinear, const tex0Info& tex0,
ZZcgSetParameter4fv(pfragment->fTexOffset, v, "g_fTexOffset");
// get hardware texture dims
int texheight = (pmemtarg->realheight+pmemtarg->widthmult-1)/pmemtarg->widthmult;
//int texheight = (pmemtarg->realheight+pmemtarg->widthmult-1)/pmemtarg->widthmult;
int texwidth = GPU_TEXWIDTH*pmemtarg->widthmult*pmemtarg->channels;
v.y = 1.0f;
@ -2136,7 +2136,7 @@ inline void ZeroGS::NeedFactor( int w ) {
}
}
static int CheckArray[48][2] = {{0,}};
//static int CheckArray[48][2] = {{0,}};
void ZeroGS::SetAlphaVariables(const alphaInfo& a)
{
@ -2147,7 +2147,7 @@ void ZeroGS::SetAlphaVariables(const alphaInfo& a)
g_vars._bAlphaState = 0; // set all to zero
bNeedBlendFactorInAlpha = 0;
b2XAlphaTest = 1;
u32 dwTemp = 0xffffffff;
//u32 dwTemp = 0xffffffff;
bDestAlphaColor = 0;
// default

View File

@ -95,7 +95,8 @@ bool ZeroGS::Load(s8* pbydata)
GSStateReset();
pbydata += 32;
int context = *(int*)pbydata; pbydata += 4;
//int context = *(int*)pbydata;
pbydata += 4;
u32 savelimit = VBSAVELIMIT;
savelimit = *(u32*)pbydata; pbydata += 4;

View File

@ -320,12 +320,11 @@ void ZeroGS::CaptureFrame()
vector<u32> data(nBackbufferWidth*nBackbufferHeight);
glReadPixels(0, 0, nBackbufferWidth, nBackbufferHeight, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]);
if (glGetError() != GL_NO_ERROR)
return;
int fps = SMODE1->CMOD == 3 ? 50 : 60;
if (glGetError() != GL_NO_ERROR) return;
#ifdef _WIN32
int fps = SMODE1->CMOD == 3 ? 50 : 60;
bool bSuccess = ADD_FRAME_FROM_DIB_TO_AVI("AAAA", fps, nBackbufferWidth, nBackbufferHeight, 32, &data[0]);
if( !bSuccess ) {

View File

@ -213,8 +213,8 @@ ZeroGS::VB::CheckFrameAddConstraints(int tbp)
if( maxpos > 256 )
maxpos &= ~0x1f;
int noscissorpos = maxpos;
int ConstrainR1 = ConstraintReson;
//int noscissorpos = maxpos;
//int ConstrainR1 = ConstraintReson;
maxpos = FindMinimalHeightConstrain(maxpos);
frame = gsfb;

View File

@ -13,7 +13,6 @@
#define NUM_SHADERS (NUM_FILTERS*NUM_TYPES*NUM_TEXWRAPS*32) // # shaders for a given ps
const static char* g_pShaders[] = { "full", "reduced", "accurate", "accurate-reduced" };
const static char* g_pPsTexWrap[] = { "-DREPEAT", "-DCLAMP", "-DREGION_REPEAT", NULL };
const static char* g_pTexTypes[] = { "32", "tex32", "clut32", "tex32to16", "tex16to8h" };
@ -22,14 +21,14 @@ const static char* g_pTexTypes[] = { "32", "tex32", "clut32", "tex32to16", "tex1
#define TEXWRAP_REGION_REPEAT 2
#define TEXWRAP_REPEAT_CLAMP 3
inline int GET_SHADER_INDEX(int type, int texfilter, int texwrap, int fog, int writedepth, int testaem, int exactcolor, int context, int ps)
static __forceinline int GET_SHADER_INDEX(int type, int texfilter, int texwrap, int fog, int writedepth, int testaem, int exactcolor, int context, int ps)
{
return type + texfilter*NUM_TYPES + NUM_FILTERS*NUM_TYPES*texwrap + NUM_TEXWRAPS*NUM_FILTERS*NUM_TYPES*(fog+2*writedepth+4*testaem+8*exactcolor+16*context+32*ps);
}
extern CGcontext g_cgcontext;
static CGprogram LoadShaderFromType(const char* srcdir, const char* srcfile, int type, int texfilter, int texwrap, int fog, int writedepth, int testaem, int exactcolor, int ps, int context)
static __forceinline CGprogram LoadShaderFromType(const char* srcdir, const char* srcfile, int type, int texfilter, int texwrap, int fog, int writedepth, int testaem, int exactcolor, int ps, int context)
{
assert( texwrap < NUM_TEXWRAPS);
assert( type < NUM_TYPES );

View File

@ -1242,11 +1242,9 @@ CRenderTarget* ZeroGS::CRenderTargetMngr::GetTarg(const frameInfo& frame, u32 op
for(MAPTARGETS::iterator it = mapTargets.begin(); it != mapTargets.end(); ++it) {
if( it->second->start < end && start < it->second->end ) {
if((g_GameSettings&GAME_FASTUPDATE) ||
(frame.fbw == it->second->fbw)
&&
(frame.fbw == it->second->fbw) &&
// check depth targets only if partialdepth option
((it->second->fbp != frame.fbp) || ((g_GameSettings&GAME_PARTIALDEPTH)&&(opts&CRenderTargetMngr::TO_DepthBuffer))))
((it->second->fbp != frame.fbp) || ((g_GameSettings & GAME_PARTIALDEPTH) && (opts & CRenderTargetMngr::TO_DepthBuffer))))
{
if( besttarg != 0 ) {
besttarg = 0;
@ -1544,11 +1542,11 @@ bool ZeroGS::CMemoryTarget::ValidateTex(const tex0Info& tex0, int starttex, int
}
// delete clearminy, clearmaxy range (not the checkstarty, checkendy range)
int newstarty = 0;
//int newstarty = 0;
if( clearminy <= starty ) {
if( clearmaxy < starty + height) {
// preserve end
height = starty+height-clearmaxy;
height = starty + height - clearmaxy;
starty = clearmaxy;
assert(height > 0);
}
@ -2412,7 +2410,7 @@ void FlushTransferRanges(const tex0Info* ptex)
{
FUNCLOG
assert( s_RangeMngr.ranges.size() > 0 );
bool bHasFlushed = false;
//bool bHasFlushed = false;
list<CRenderTarget*> listTransmissionUpdateTargs;
int texstart = -1, texend = -1;
@ -2554,7 +2552,7 @@ void InitTransferHostLocal()
WARN_LOG("Transfer error, width exceeds\n");
#endif
bool bHasFlushed = false;
//bool bHasFlushed = false;
gs.imageX = gs.trxpos.dx;
gs.imageY = gs.trxpos.dy;
@ -3199,8 +3197,8 @@ void _Resolve(const void* psrc, int fbp, int fbw, int fbh, int psm, u32 fbm, boo
GetRectMemAddress(start, end, psm, 0, 0, fbw, fbh, fbp, fbw);
int i, j;
short smask1 = gs.smask&1;
short smask2 = gs.smask&2;
//short smask1 = gs.smask&1;
//short smask2 = gs.smask&2;
u32 mask, imask;
if (PSMT_ISHALF(psm)) { // 16 bit

View File

@ -351,7 +351,7 @@ void ZeroGS::Reset()
void ZeroGS::ChangeDeviceSize(int nNewWidth, int nNewHeight)
{
FUNCLOG
int oldscreen = s_nFullscreen;
//int oldscreen = s_nFullscreen;
int oldwidth = nBackbufferWidth, oldheight = nBackbufferHeight;
if( !Create(nNewWidth&~7, nNewHeight&~7) ) {