[Mesa-dev] Extension help

Ian Romanick idr at freedesktop.org
Fri Aug 2 22:03:29 UTC 2019


On 8/2/19 1:13 PM, Fritz Koenig wrote:
> Hi,
> 
> I would like to be able to use the MESA_framebuffer_flip_y extension
> in GLES 3.0.  The blocker is that FramebufferParameteri is not part of
> GLES 3.0.  I have explored a couple of ways of achieving this.
> 
> 1.   FramebufferParameteri was first provided by the GL extension
> ARB_framebuffer_no_attachments.  However,
> ARB_framebuffer_no_attachments was never a GLES extension.  An option
> would be to modify the ARB_framebuffer_no_attachments spec to make it
> an extension for GLES.
> 
> 2.  Change the MESA_framebuffer_flip_y spec to allow the extension to
> implement FramebufferParameteri.

GLES has more strict rules about what functions can be advertised than
desktop OpenGL.  Since glFramebufferParameteri is part of the reserved
namespace, I'm not 100% sure that it's legal to expose it in pre-3.1.  I
would suggest making a PR to the registry first.

My gut tells me you're going to have to add a FramebufferParameteriMESA
function that is an alias of FramebufferParameteri.

Has this extension already shipped in a Mesa release?

> I choose the 2nd option and put together a pr for it[1].
> 
> I didn't get the implementation quite right, and I'm looking for some
> help.  My change is failing the DispatchSanity_test.GLES3 test:
> 
> [ RUN      ] DispatchSanity_test.GLES3
> ../src/mesa/main/tests/dispatch_sanity.cpp:174: Failure
>       Expected: nop_table[i]
>       Which is: 0x563d50d6fa01
> To be equal to: table[i]
>       Which is: 0x563d50db158a
> i = 888 (FramebufferParameteri)
> ../src/mesa/main/tests/dispatch_sanity.cpp:174: Failure
>       Expected: nop_table[i]
>       Which is: 0x563d50d6fa01
> To be equal to: table[i]
>       Which is: 0x563d50db1add
> i = 889 (GetFramebufferParameteriv)
> [  FAILED  ] DispatchSanity_test.GLES3 (1 ms)
> 
> It appears there is a problem with the way that I'm
> defining/redefining FramebufferParameteri.  I've tried adding it to
> src/mapi/glapi/gen/es_EXT.xml, but the only way I was able to achieve
> that was to give it a different function name and an alias.
> 
> Does anyone have experience with this sort of backporting of
> extensions that could offer some insight on what I might be doing
> wrong?
> 
> Thanks.
> 
> -Fritz
> 
> [1]: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1560
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list