diff options
author | Chad Versace <[email protected]> | 2012-05-03 16:02:50 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2012-05-07 08:38:12 -0700 |
commit | 1c0f5d8324c4db2720247989ddc4a45315b55a85 (patch) | |
tree | 7f120c41effca99f9b49880ddf2cbfaf9b337ce9 /src | |
parent | 64c510bb72c7b81eb1fd96df47bdf62817a09fa7 (diff) |
intel: Disable ARB_framebuffer_object in ES contexts
This patch removes ARB_framebuffer_object from the GLES1 and GLES2
extension lists in intel_extensions_es.c.
Fixes a crash in the Android browser on Ice Cream Sandwich.
The Android browser crashed because it did the following, which is legal
in GLES2 but not in ARB_framebuffer_object.
glGenFramebuffers(1, &fb);
glBindFramebuffer(GL_FRAMEBUFFER, fb);
// render render render...
glDeleteFramebuffers(1, &fb);
// go do other stuff...
glBindFramebuffer(GL_FRAMEBUFFER, fb);
// This bind unexpectedly failed, and the app panics.
The semantics of glBindFramebuffer specified by ARB_framebuffer_object (a
desktop GL extension) and GLES2 specs are incompatible. The ideal solution
to fix this is to create separate API entry points for glBindFramebuffer,
one for GL and the other for GLES2. But, until that work is complete,
disabling ARB_framebuffer_object in GLES2 contexts safely fixes the problem.
Likewise, the semantics of glBindFramebuffer in ARB_framebuffer_object and
of glBindFramebufferOES in OES_framebuffer_object (a GLES1 extension) are
incompatible. Even though the functions have different names, the semantic
difference still results in a bug because both API calls are implemented
by a single function, _mesa_BindFramebufferEXT, which handles the semantic
difference incorrectly. Again, disabling ARB_framebuffer_object in GLES1
contexts safely fixes this problem.
According to the ARB_framebuffer_object spec, the extension is an
amalgamation of
EXT_framebuffer_object
EXT_framebuffer_blit
EXT_packed_depth_stencil
EXT_framebuffer_multisample
By disabling this extension, however, no functionality is removed from
GLES1 and GLES2 contexts because 1) the first three extensions are
explicitly enabled in Intel's ES extension lists and 2) no functionality
of the last extension is exposed in an ES context.
Note: This is a candidate for the 8.0 branch.
See-also: http://www.mail-archive.com/[email protected]/msg21006.html
CC: Charles Johnson <[email protected]>
CC: Sean Kelley <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_extensions_es.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_extensions_es.c b/src/mesa/drivers/dri/intel/intel_extensions_es.c index 29eb8eab529..b42907c89bb 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions_es.c +++ b/src/mesa/drivers/dri/intel/intel_extensions_es.c @@ -66,7 +66,6 @@ static const char *es1_extensions[] = { "GL_EXT_blend_func_separate", "GL_EXT_blend_subtract", "GL_OES_draw_texture", - "GL_ARB_framebuffer_object", "GL_EXT_framebuffer_object", "GL_ARB_point_sprite", "GL_EXT_stencil_wrap", @@ -92,7 +91,6 @@ static const char *es2_extensions[] = { "GL_NV_blend_square", /* Optional GLES2 */ - "GL_ARB_framebuffer_object", "GL_ARB_depth_texture", "GL_EXT_framebuffer_object", |