Skip to content

glx: Fix error handling yet again in CreateContextAttribs

Adam Jackson requested to merge ajax/mesa:glx-issue-4763 into main

You ever pull on a thread and unravel the whole tapestry?

This started out as an attempt to work around an X11 request sequence number issue between xlib and xcb, by simplifying CreateContextAttribs to match legacy CreateContext: if creating the client-side direct context state failed, error out immediately without sending a request to the X server. This creates a problem: glXCreateContextAttribsARB has some Very elaborately specified error conditions, and we were relying on the server to generate the right ones for us, so now piglit explodes in interesting ways. And just wiring up the existing error generation doesn't work for a variety of reasons so we have to fix things to generate the right errors.

I'm not quite done with this line of poking, we should be able to unify the dri*_create_context_attribs routines further and a ton of stuff gets simpler if you do that, but this appeases piglit and doesn't have the request-numbering issue so let's checkpoint here.

Edited by Adam Jackson

Merge request reports