mirror of https://github.com/PCSX2/pcsx2.git
ZZogl-pg: In the Debug build, downgrade various assertions to log messages.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3209 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6de9dbeca0
commit
ee1d7f137b
|
@ -715,7 +715,7 @@ inline void RenderCheckForMemory(tex0Info& texframe, list<CRenderTarget*>& listT
|
|||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
}
|
||||
|
||||
// Put FPS counter on scren (not in window title)
|
||||
// Put FPS counter on screen (not in window title)
|
||||
inline void AfterRenderDisplayFPS()
|
||||
{
|
||||
char str[64];
|
||||
|
|
|
@ -519,7 +519,7 @@ bool ZeroGS::Create(int _width, int _height)
|
|||
ZZLog::Error_Log("Failed to create the renderbuffer.");
|
||||
}
|
||||
|
||||
assert(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT);
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, s_uFramebuffer);
|
||||
|
||||
|
|
|
@ -643,11 +643,8 @@ inline void FlushSetStream(VB& curvb)
|
|||
// memcpy_amd(pdata, curvb.pBufferData, curvb.nCount * sizeof(VertexGPU));
|
||||
// glUnmapBuffer(GL_ARRAY_BUFFER);
|
||||
SET_STREAM();
|
||||
#ifdef _DEBUG
|
||||
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
|
||||
assert(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT);
|
||||
#endif
|
||||
|
||||
|
||||
GL_REPORT_ERRORD();
|
||||
}
|
||||
|
||||
int SetMaskR = 0x0;
|
||||
|
@ -1867,7 +1864,8 @@ void ZeroGS::SetContextTarget(int context)
|
|||
|
||||
assert(curvb.prndr != NULL && curvb.pdepth != NULL);
|
||||
|
||||
assert(curvb.pdepth->fbh == curvb.prndr->fbh);
|
||||
if (curvb.pdepth->fbh != curvb.prndr->fbh) ZZLog::Debug_Log("(curvb.pdepth->fbh(0x%x) != curvb.prndr->fbh(0x%x))", curvb.pdepth->fbh, curvb.prndr->fbh);
|
||||
//assert(curvb.pdepth->fbh == curvb.prndr->fbh);
|
||||
|
||||
if (curvb.pdepth->status & CRenderTarget::TS_Virtual)
|
||||
{
|
||||
|
|
|
@ -280,7 +280,7 @@ inline int ZeroGS::VB::CheckFrameResolveDepth(int tbp)
|
|||
|
||||
assert(pnewdepth != NULL && prndr != NULL);
|
||||
if (pnewdepth->fbh != prndr->fbh) ZZLog::Debug_Log("pnewdepth->fbh(0x%x) != prndr->fbh(0x%x)", pnewdepth->fbh, prndr->fbh);
|
||||
assert(pnewdepth->fbh == prndr->fbh);
|
||||
//assert(pnewdepth->fbh == prndr->fbh);
|
||||
|
||||
if ((pprevdepth != pnewdepth) || (pprevdepth != NULL && (pprevdepth->status & CRenderTarget::TS_NeedUpdate)))
|
||||
result = 2;
|
||||
|
@ -407,7 +407,7 @@ void ZeroGS::VB::CheckFrame(int tbp)
|
|||
if (prndr != NULL) SetContextTarget(ictx);
|
||||
}
|
||||
|
||||
// This is the case, most easy to perform, when nothinh was changed
|
||||
// This is the case, most easy to perform, when nothing was changed
|
||||
inline void ZeroGS::VB::FlushTexUnchangedClutDontUpdate()
|
||||
{
|
||||
if (ZZOglGet_cld_TexBits(uNextTex0Data[1]))
|
||||
|
|
|
@ -580,7 +580,7 @@ void ZeroGS::CRenderTarget::ConvertTo32()
|
|||
// assume depth already set !?
|
||||
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_NV, ptexConv, 0);
|
||||
ZeroGS::ResetRenderTarget(1);
|
||||
assert(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT);
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
BindToSample(&ptex) ;
|
||||
|
||||
|
@ -688,7 +688,7 @@ void ZeroGS::CRenderTarget::ConvertTo16()
|
|||
// assume depth already set !?
|
||||
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_NV, ptexConv, 0);
|
||||
ZeroGS::ResetRenderTarget(1);
|
||||
assert(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT);
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
BindToSample(&ptex) ;
|
||||
|
||||
|
@ -796,7 +796,7 @@ void ZeroGS::CRenderTarget::_CreateFeedback()
|
|||
|
||||
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_NV, ptexFeedback, 0);
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_NV, ptex);
|
||||
assert(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT);
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
cgGLSetTextureParameter(ppsBaseTexture.sFinal, ptex);
|
||||
cgGLEnableTextureParameter(ppsBaseTexture.sFinal);
|
||||
|
@ -827,7 +827,7 @@ void ZeroGS::CRenderTarget::_CreateFeedback()
|
|||
vb[icurctx].bVarsTexSync = 0;
|
||||
}
|
||||
|
||||
assert(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT);
|
||||
GL_REPORT_ERRORD();
|
||||
}
|
||||
|
||||
void ZeroGS::CRenderTarget::SetRenderTarget(int targ)
|
||||
|
@ -836,8 +836,9 @@ void ZeroGS::CRenderTarget::SetRenderTarget(int targ)
|
|||
|
||||
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT + targ, GL_TEXTURE_RECTANGLE_NV, ptex, 0);
|
||||
|
||||
// if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT)
|
||||
// ERROR_LOG_SPAM("Too bad Framebuffer not compele, glitches could appear onscreen!\n");
|
||||
//GL_REPORT_ERRORD();
|
||||
//if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) != GL_FRAMEBUFFER_COMPLETE_EXT)
|
||||
//ERROR_LOG_SPAM("The Framebuffer is not complete. Glitches could appear onscreen.\n");
|
||||
}
|
||||
|
||||
ZeroGS::CDepthTarget::CDepthTarget() : CRenderTarget(), pdepth(0), pstencil(0), icount(0) {}
|
||||
|
@ -1039,14 +1040,13 @@ void ZeroGS::CDepthTarget::Update(int context, ZeroGS::CRenderTarget* prndr)
|
|||
|
||||
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_NV, ptex, 0);
|
||||
SetDepthStencilSurface();
|
||||
|
||||
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_RECTANGLE_NV, 0, 0);
|
||||
GLenum buffer = GL_COLOR_ATTACHMENT0_EXT;
|
||||
|
||||
|
||||
if (glDrawBuffers != NULL) glDrawBuffers(1, &buffer);
|
||||
|
||||
int stat = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
|
||||
|
||||
assert(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT);
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
SetViewport();
|
||||
|
||||
|
@ -1092,9 +1092,9 @@ void ZeroGS::CDepthTarget::SetDepthStencilSurface()
|
|||
|
||||
if (icount++ < 8) // not going to fail if succeeded 4 times
|
||||
{
|
||||
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
|
||||
|
||||
if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) != GL_FRAMEBUFFER_COMPLETE_EXT)
|
||||
{
|
||||
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0);
|
||||
|
||||
|
@ -3909,7 +3909,7 @@ void _Resolve(const void* psrc, int fbp, int fbw, int fbh, int psm, u32 fbm, boo
|
|||
void _Resolve(const void* psrc, int fbp, int fbw, int fbh, int psm, u32 fbm, bool mode)
|
||||
{
|
||||
FUNCLOG
|
||||
//assert( glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT );
|
||||
//GL_REPORT_ERRORD();
|
||||
s_nResolved += 2;
|
||||
|
||||
// align the rect to the nearest page
|
||||
|
|
|
@ -211,7 +211,8 @@ void ZeroGS::HandleGLError()
|
|||
|
||||
if (error != 0)
|
||||
{
|
||||
int w, h;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
GLint fmt;
|
||||
glGetRenderbufferParameterivEXT(GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_INTERNAL_FORMAT_EXT, &fmt);
|
||||
glGetRenderbufferParameterivEXT(GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_WIDTH_EXT, &w);
|
||||
|
@ -255,7 +256,7 @@ void ZeroGS::HandleGLError()
|
|||
break;
|
||||
|
||||
default:
|
||||
ZZLog::Error_Log("*UNKNOWN ERROR* reported from glCheckFramebufferStatusEXT() for %s!");
|
||||
ZZLog::Error_Log("*UNKNOWN ERROR* reported from glCheckFramebufferStatusEXT(0x%x)!", error);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -561,10 +562,6 @@ void ZeroGS::RenderCustom(float fAlpha)
|
|||
vb[1].bSyncVars = 0;
|
||||
|
||||
GL_REPORT_ERROR();
|
||||
|
||||
GLint status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
|
||||
|
||||
assert(status == GL_FRAMEBUFFER_COMPLETE_EXT || status == GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT);
|
||||
}
|
||||
|
||||
void ZeroGS::Restore()
|
||||
|
|
Loading…
Reference in New Issue