dri2: Fix exposing robustness with swkms.
authorEmma Anholt <emma@anholt.net>
Thu, 12 Jan 2023 18:43:06 +0000 (10:43 -0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 17 Jan 2023 21:19:18 +0000 (21:19 +0000)
commit6b0db6bf8b5467fd1f357bbacd6750a26d089517
treeba66ce7f63b17c7a7cbcaa2bdc1675623ba5d598
parentca8c8f2fc1f72cff286ddd0dec4e62e0720bd835
dri2: Fix exposing robustness with swkms.

In the original change I noticed that missing robustness on swkms seemed
to be an oversight, since it was enabled on sw-non-kms, so I exposed the
ext based on the underlying pipe query.  However it turns out that there
is a dri_screen flag for allowing robust contexts that exists to do error
checking for GLX, which was under an !swkms check.  So we would expose the
ext, but then throw an error if you tried to create one.

Fixes: e6285ea55fb2 ("egl: Replace the robustness DRI2 ext check with a pipe cap query.")
Closes: #8066
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20679>
src/gallium/frontends/dri/dri2.c
src/gallium/frontends/dri/dri_context.c