diff options
author | Brian Paul <[email protected]> | 2011-01-12 18:14:14 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-01-12 18:14:18 -0700 |
commit | dd973cd9e81abf1c0bc1880c7905f3277d4361a0 (patch) | |
tree | a06e3e94add60be0aeaf55e2432f3e8525e9c0cb | |
parent | 67722ae403526d8b267e29ed2ac962b806001ce5 (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.
-rw-r--r-- | src/mesa/main/fbobject.c | 7 |
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 */ |