[Mesa-dev] [PATCH] GLX: Add an env var to enable the support of GLX extensions needing both client and server support, in case of client support and direct rendering.

Kenneth Graunke kenneth at whitecape.org
Wed Jun 18 22:55:16 PDT 2014

On Wednesday, June 18, 2014 11:32:45 PM Axel Davy wrote:
> In the case of XWayland, there's no accelerated indirect rendering.
> For example GLX_ARB_create_context is not advertised by the server,
> and according to the spec, we are not allowed to advertise it
> to the application because of that.
> This env var makes Mesa ignore this restriction, and
> a GLX extension is advertised whenever the client supports it.
> Signed-off-by: Axel Davy <axel.davy at ens.fr>
> ---
>  src/glx/glxextensions.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

In this specific case, I think it might make sense to just advertise the 
extension and return a GLX error if asked for indirect rendering.  Or, just 
lie and return a direct rendering context.

That would make the common case that most people want (GLX_ARB_create_context 
for direct rendered 3.2+ core profile stuff) work out of the box, without the 
need for environment variables.  It's technically out of spec, but for X on 
Wayland, I think it's not unreasonable.

On the other hand, supporting AIGLX of sorts might be possible...

With XWayland, there are really a couple layers to "indirect" rendering...
1. Doing it X client side (direct rendering)
2. Doing it in the XWayland X11 server/Wayland client (semi-indirect).
3. Doing it wherever Weston/etc are running (total indirect).

It seems like XWayland could support AIGLX with model #2 - X clients would 
speak GLX protocol to XWayland, which could then do the GL.  Model #3 seems 
like something we should avoid at all costs.

Of course, I don't know that there's any *benefit* to supporting AIGLX in 
XWayland, so...my real suggestion is to just raise a GLX error or lie if asked 
to create an indirect context.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140618/a6e4a9e7/attachment.sig>

More information about the mesa-dev mailing list