summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-01-12 18:14:14 -0700
committerBrian Paul <[email protected]>2011-01-12 18:14:18 -0700
commitdd973cd9e81abf1c0bc1880c7905f3277d4361a0 (patch)
treea06e3e94add60be0aeaf55e2432f3e8525e9c0cb /src
parent67722ae403526d8b267e29ed2ac962b806001ce5 (diff)
mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()
Fixes a failed assertion when a renderbuffer ID that was gen'd but not previously bound was passed to glFramebufferRenderbuffer(). Generate the same error that NVIDIA does. NOTE: This is a candidate for the 7.9 and 7.10 branches.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 3e7fd9cf0ec..e3aefe9b855 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1924,6 +1924,13 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
" renderbuffer %u)", renderbuffer);
return;
}
+ else if (rb == &DummyRenderbuffer) {
+ /* This is what NVIDIA does */
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glFramebufferRenderbufferEXT(renderbuffer %u)",
+ renderbuffer);
+ return;
+ }
}
else {
/* remove renderbuffer attachment */