modesetting: Use EGL_MESA_query_driver to select DRI driver if possible

We now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver
name; if successful, we use that as the DRI driver name.  Following the
existing dri2.c logic, we also use the same name for the VDPAU driver,
except for i965 (and now iris), where we switch to the "va_gl" fallback.

This allows us to bypass the PCI ID lists in xserver and centralize the
driver selection mechanism inside Mesa.  The hope is that we no longer
have to update these lists for any future hardware.

(backported from commit 8d4be7f6)

Acked-by: Michel Dänzer <>
3 jobs for query-driver-1.20 in 5 minutes and 31 seconds (queued for 50 seconds)
Status Job ID Name Coverage
  Docker Image
passed #1076874


  Build And Test
passed #1076875


passed #1076876