Commit Graph

8 Commits

Author SHA1 Message Date
Adam Jackson 2c8a85b712 glx: Stash a copy of the XExtCodes in the glx_display
Instead of a pointer into xlib's state for it. Mostly because it lets us
remove our copy of majorOpcode from the display without taking another
pointer indirection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>
2021-04-29 20:34:25 +00:00
Timothy Arceri a01b393c39 Revert "glx: Fix synthetic error generation in __glXSendError"
This reverts commit e91ee763c3.

This seems to have broken a number of wine games. Lets revert
everything for now and try again later.

Acked-by: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110632
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110590
2019-05-08 13:16:44 +10:00
Hal Gentz e91ee763c3 glx: Fix synthetic error generation in __glXSendError
To quote Uli Schlachter, who understands this stuff more than I do:

>   The function __glXSendError() in mesa's src/glx/glx_error.c invents an X11
> protocol error out of thin air. For the sequence number it uses dpy->request.
> This is the sequence number of the last request that was sent. _XError() will
> then update dpy->last_request_read based on the sequence number of the error
> that just "came in".
>
>   If now another something comes in with a sequence number less than
> dpy->last_request_read, since sequence numbers are monotonically increasing,
> widen() will incorrectly add 1<<32 to the sequence number and things might go
> downhill afterwards.

`__glXSendErrorForXcb` was also patched, as that's the function that
`glXCreateContextAttribsARB` actually uses.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99781
Cc: mesa-stable@lists.freedesktop.org
Fixes: ad503c41 'apple: Initial import of libGL for OSX from AppleSGLX svn repository'
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
2019-04-29 12:52:48 -04:00
Michel Dänzer 4ac640e3d2 glx: Don't use current context in __glXSendError
There's no guarantee that there is one, and we don't need one anyway.

Fixes piglit tests:

glx@glx-fbconfig-bad
glx@glx_ext_import_context@import context, multi process
glx@glx_ext_import_context@import context, single process

Fixes: 2e3f067458 ("glx: fix error code when there is no context bound")
Cc: "11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2016-08-17 17:16:34 +09:00
Bernard Kilarski 2e3f067458 glx: fix error code when there is no context bound
v2: change all related NULL checks to check against dummyContext
v3: really check for dummyContext *only* when ctx was from
    __glXGetCurrentContext
v4: cover more checks, add dummyBuffer, dummyVtable (Emil)

Signed-off-by: Bernard Kilarski <bernard.r.kilarski@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: "11.2" <mesa-stable@lists.freedesktop.org>
2016-08-15 09:24:10 +03:00
Ian Romanick fba400072f glx: Deliver an xlib style error to the application from an XCB error
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2011-12-23 08:40:30 -08:00
Ian Romanick b1ffb3335f glx: Make parameter types for __glXSendError match protocol types
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-19 14:55:31 -08:00
Ian Romanick 6f76efa922 glx: Make __glXSendError available in non-Apple builds
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-19 14:55:31 -08:00
Renamed from src/glx/apple/glx_error.c (Browse further)