On Wed, Jun 18, 2014 at 11:32 PM, Axel Davy <axel.d...@ens.fr> 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.d...@ens.fr> > --- > src/glx/glxextensions.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c > index ce5d66d..34cb6d0 100644 > --- a/src/glx/glxextensions.c > +++ b/src/glx/glxextensions.c > @@ -566,10 +566,15 @@ __glXCalculateUsableExtensions(struct glx_screen * psc, > GLboolean display_is_direct_capable, > int minor_version) > { > + const char *ignore_server_restrictions = getenv("IGNORE_SERVER");
I think such variables tend to have some sort of prefix. GLX_ seems to make sense here... or MESA_. > + unsigned char should_ignore_server_restrictions = 0; > unsigned char server_support[8]; > unsigned char usable[8]; > unsigned i; > > + if (ignore_server_restrictions && !strcmp(ignore_server_restrictions,"1")) > + should_ignore_server_restrictions = 0xff; > + > __glXExtensionsCtr(); > __glXExtensionsCtrScreen(psc); > > @@ -617,7 +622,9 @@ __glXCalculateUsableExtensions(struct glx_screen * psc, > | (client_glx_support[i] & psc->direct_support[i] & > server_support[i]) > | (client_glx_support[i] & psc->direct_support[i] & > - direct_glx_only[i]); > + direct_glx_only[i]) > + | (client_glx_support[i] & psc->direct_support[i] & > + should_ignore_server_restrictions); > } > } > else { > -- > 1.9.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev