On 12/01/2012 12:41 PM, Kenneth Graunke wrote:
On 12/01/2012 11:10 AM, Ian Romanick wrote:
From: Ian Romanick <ian.d.roman...@intel.com>
Desktop OpenGL implementations that support either
GL_ARB_framebuffer_object
or OpenGL 3.0 must require names from glGenFramebuffers for
glBindFramebuffer. We have enforced this rule for quite some time.
However,
OpenGL ES 1.0, 2.0, and 3.0 implementations are required to allow
user-defined
names (e.g., not from glGenFramebuffers{OES,}).
Ugh...seriously? What were they thinking? They require Gen'd names for
just about everything else in ES 3.0...
All new object types use the new behavior (requiring Gen'd names).
Vertex array objects, sampler objects, transformfeedback objects, etc.
must use Gen'd names.
All pre-existing object types continue to have the old behavior (not
requiring Gen'd names) for backwards compatibility with OpenGL ES 2.0.
Textures, framebuffer objects, and renderbuffers (which, it now occurs
to me, my patch misses) can use user-generated names.
The Intel drivers have hacked around this by not enabling
GL_ARB_framebuffer_object in an ES context. Instead, just pick the
correct
behavior in _mesa_BindFramebuffer based on the context API.
This was the whole reason for the EXT/ARB debacle we had? Over one line
of code? :)
Looks good to me...both patches are:
Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>
(but I really want Chad's review)
Signed-off-by: Ian Romanick <ian.d.roman...@intel.com>
Cc: Chad Versace <chad.vers...@linux.intel.com>
Cc: Matt Turner <matts...@gmail.com>
---
src/mesa/main/fbobject.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index d05c1e4..f3d292d 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1743,7 +1743,9 @@ _mesa_BindFramebuffer(GLenum target, GLuint
framebuffer)
/* ID was reserved, but no real framebuffer object made yet */
newDrawFb = NULL;
}
- else if (!newDrawFb && ctx->Extensions.ARB_framebuffer_object) {
+ else if (!newDrawFb
+ && _mesa_is_desktop_gl(ctx)
+ && ctx->Extensions.ARB_framebuffer_object) {
/* All FBO IDs must be Gen'd */
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBindFramebuffer(buffer)");
return;
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev