glx: check OpenGL 3.1 extensions
glx: check OpenGL 3.1 extensions

I successfully implemented hardware decoding with VAAPI via FFmpeg
by copying the data back to the CPU's memory; however, when I tried
to use the data directly from the GPU (instead of copying them back)
by using VA/GLX to convert the decoded VASurfaces to OpenGL textures,
I ran into some issues.

With the latest version of libva, vaCreateSurfaceGLX fails all the time
when I set OpenGL to 3.1 or above. If I set it to 3.0, then it doesn't
fail, and everything works correctly. I downloaded the sources of libva
and it fails when checking for GL extensions because of the use of
glGetString(GL_EXTENSIONS) which is deprecated. I have implemented a fix
on my end (which I've attached for convenience) which works well for me
but I haven't done a lot of testing, and I would rather use the official
version of libva.

Signed-off-by: Cyril Drouet <71aaa3a8fc6be62d742c1d7ee1065d73f22fb9a8@immerex.com>
Signed-off-by: Víctor Jáquez <853e0dbb5ddd43a0f0483f24794ae05c4c52af91@igalia.com>

01org/iotg-lin-gfx-libva,01org/libva-cros,01org/libva-cros,01org/iotg-lin-gfx-libva,01org/iotg-lin-gfx-libva,01org/libva-cros