зеркало из https://github.com/mozilla/pjs.git
Bug 705641 - Add reason for framebuffer incompleteness to abort message. r=jrmuizel
This commit is contained in:
Родитель
3d814a169b
Коммит
03b2f1037e
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче