Bug 705641 - Add reason for framebuffer incompleteness to abort message. r=jrmuizel

This commit is contained in:
Ali Juma 2011-12-02 09:43:58 -05:00
Родитель bb68071e30
Коммит ddae3eecb1
2 изменённых файлов: 18 добавлений и 10 удалений

Просмотреть файл

@ -2498,14 +2498,16 @@ GLContext::SetBlitFramebufferForDestTexture(GLuint aTexture)
aTexture,
0);
if (aTexture && (fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER) !=
LOCAL_GL_FRAMEBUFFER_COMPLETE)) {
GLenum result = fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER);
if (aTexture && (result != LOCAL_GL_FRAMEBUFFER_COMPLETE)) {
nsCAutoString msg;
msg.Append("Framebuffer not complete -- error 0x");
msg.AppendInt(result, 16);
// Note: if you are hitting this, it is likely that
// your texture is not texture complete -- that is, you
// allocated a texture name, but didn't actually define its
// size via a call to TexImage2D.
NS_RUNTIMEABORT("Error setting up framebuffer --- framebuffer not complete!");
NS_RUNTIMEABORT(msg.get());
}
}

Просмотреть файл

@ -1000,9 +1000,12 @@ LayerManagerOGL::SetupBackBuffer(int aWidth, int aHeight)
mBackBufferTexture,
0);
if (mGLContext->fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER) !=
LOCAL_GL_FRAMEBUFFER_COMPLETE) {
NS_RUNTIMEABORT("Error setting up framebuffer --- framebuffer not complete");
GLenum result = mGLContext->fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER);
if (result != LOCAL_GL_FRAMEBUFFER_COMPLETE) {
nsCAutoString msg;
msg.Append("Framebuffer not complete -- error 0x");
msg.AppendInt(result, 16);
NS_RUNTIMEABORT(msg.get());
}
mBackBufferSize.width = aWidth;
@ -1161,9 +1164,12 @@ LayerManagerOGL::CreateFBOWithTexture(const nsIntRect& aRect, InitMode aInit,
// Making this call to fCheckFramebufferStatus prevents a crash on
// PowerVR. See bug 695246.
if (mGLContext->fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER) !=
LOCAL_GL_FRAMEBUFFER_COMPLETE) {
NS_RUNTIMEABORT("Error setting up framebuffer --- framebuffer not complete");
GLenum result = mGLContext->fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER);
if (result != LOCAL_GL_FRAMEBUFFER_COMPLETE) {
nsCAutoString msg;
msg.Append("Framebuffer not complete -- error 0x");
msg.AppendInt(result, 16);
NS_RUNTIMEABORT(msg.get());
}
SetupPipeline(aRect.width, aRect.height, DontApplyWorldTransform);