[Mesa-dev] Conflicts between OES/EXT/ARB_framebuffer_object and GL3.0/GLES2

Chad Versace chad.versace at linux.intel.com
Thu May 3 11:29:18 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/03/2012 10:33 AM, Eric Anholt wrote:
> On Wed, 02 May 2012 18:32:01 -0700, Chad Versace <chad.versace at linux.intel.com> wrote:
>> Solutions for core Mesa
>> -----------------------
>>
>> As for fixing _mesa_BindFramebufferEXT, I have two ideas.
>>
>> 1. Enforce in _mesa_BindFramebufferEXT that no more than one of ARB_fbo
>>    and EXT_fbo is enabled, then clean up its validation logic. This is
>>    a big hammer, and, if done right, can eliminate any ambiguities in behavior.
>>    (FYI, if I understand the gallium code, the only drivers that currently
>>    enable both are Intel, swrast, and OSMesa).
>>
>> 2. Create separate entry points:
>>       - _mesa_BindFramebufferEXT, which implements
>>           - glBindFramebufferEXT
>>           - glBindFramebufferOES
>>           - glBindFramebuffer in GLES2
>>       - _mesa_BindFramebufferARB, which implements
>>           - glBindFramebufferARB
>>           - glBindFramebuffer in GL 3.x
> 
> 3. Just change this hunk of _msea_BindFramebufferEXT:
> 
>       else if (!newDrawFb && ctx->Extensions.ARB_framebuffer_object) {
>          /* All FBO IDs must be Gen'd */
>          _mesa_error(ctx, GL_INVALID_OPERATION, "glBindFramebuffer(buffer)");
>          return;
>       }
> 
> to just not throw the error if EXT_fbo or if the API is ES2?

I don't believe 3 will work.

Suppose we are in a GL3.x context with EXT_fbo advertised.
Once the execution path has entered _mesa_BindFramebufferEXT, it is not possible to know
if the client called glBindFramebuffer (which has ARB_fbo semantics) or called
glBindFramebufferEXT, yet the two functions have different behavior. As far as I can tell,
the only way to give the functions different behavior is create separate API entry points.

- ----
Chad Versace
chad.versace at linux.intel.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPos58AAoJEAIvNt057x8ier0P/363zaXqqMaF5QN1qJXnBteg
Sz45Kn4yseubOHQ+Hrsx4PVoRI6UtpR1wlVnD9/vSiVU9u/uA8jBLDMd//oZ73xA
hVXy+UfiFv/d/yJqXMIR1gvli0mtThOdpZD8LVN7whAVYILyZQdBQE66OBd5RNY4
MEUVYpCbIuLUN6k0Zq7KP8V0j8yk5OmbxBKT71finxYUsq0HNjNQ5UaCZLVtrL06
wiz5Y07P3G8QOrbLLXSVNvBglj58llEkF6BjrKb13/tRnKs40UEnN5tTZ8A1T2F9
EI0yZga8B/ZLciox7F38ByW/5sJZPSCqs7A18dab/Lzj8W7fBeoE1Grky+xhzbnu
M9OAwf0yIQbS3MdH8y15h35M1wyFkAUq3NdPm1D5PfYX9BlHZxqpOkWG/P1/T1Hf
5N+Qhl8Tc9ghqPcOMM2453tWF7AoK9Qs5BdXTHRB3Bi1q/NhCVzEFsuOYTbtpPOI
Zlu2OnpidKMsUR+X+zUjXq5nEh9T0j7Zubvr0YJde/Nok375MLLKAIhhiFy3RTIX
DT4WYsItFo3rAOgcTvKUpFqOQZEjzwyi2bo2+438oZXz7I3tbP8CJH17KrtvJvsr
70M3ix2j+TJC8yKyR1eAiWLFluf3ZNgdqD3wevQv6wHmuZKJ5PC9nXvnm0WpsmzL
AgqLaYiIJkHsKVo2Syyp
=V13D
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list