From: Brian Paul Date: Thu, 13 Jan 2011 01:14:14 +0000 (-0700) Subject: mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd973cd9e81abf1c0bc1880c7905f3277d4361a0;p=mesa.git 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. --- 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 */