glx: add make and copy bad access checks
commitd8c08d123fadb986e9a8a7887b922ff63fcff52e
authorIllia Polishchuk <illia.a.polishchuk@globallogic.com>
Tue, 25 Apr 2023 08:36:59 +0000 (25 11:36 +0300)
committerMarge Bot <emma+marge@anholt.net>
Tue, 16 May 2023 17:55:35 +0000 (16 17:55 +0000)
tree09badd2f4d2158863f7918a094066775f45a4850
parentdb1c07f7cee6fd939b35eb66781418b162ec7168
glx: add make and copy bad access checks

The GLX spec for glXMakeCurrent (3.3):
"If ctx is current to some other thread, then glXMakeCurrent will generate
a BadAccess error"

The GLX spec for glXCopyContext (3.3):
"If the destination context is current for some thread then a BadAccess
error is generated"

Mesa MR with this checks: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22546

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/802>
tests/glx/CMakeLists.gl.txt
tests/glx/glx-copy-context-dest-current.c [new file with mode: 0644]
tests/glx/glx-make-current-other-thread.c [new file with mode: 0644]
tests/opengl.py