glx: Fix and simplify the share context compatibility check
authorAdam Jackson <ajax@redhat.com>
Fri, 6 Aug 2021 21:10:45 +0000 (17:10 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Aug 2021 21:11:02 +0000 (21:11 +0000)
commit145992890caeb24c02bd358f7a96dc1d8b730626
tree82553e834625a3dcf0c918f344dbed9f00a13024
parent5c71bf065f359aae021d58dc47eb4c770e0f8ded
glx: Fix and simplify the share context compatibility check

We only end up with one DRI provider per screen, so the only way the
context vtable can differ is if they're not the same directness. Rewrite
the test in those terms to help us unify some of this code away in the
future. Also apply the same logic to the indirect context creation path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456>
src/glx/dri2_glx.c
src/glx/dri3_glx.c
src/glx/drisw_glx.c
src/glx/indirect_glx.c