glamor: Fix rendering of pixmap textures backed by EGLImageKHR image

According to khronos documentation, "If <target> is not
TEXTURE_EXTERNAL_OES, the error INVALID_ENUM is generated." if
glEGLImageTargetTexture2DOES is called for an image created by using
EGL_KHR_image_pixmap extension. Not only that, but we must use
samplerExternalOES and not sampler2D to access such a texture from the
fragment shader. In addition we must require GL_OES_EGL_image_external from
the shader to be able to use the extension.

Fix the above issues by providing the correct texture unit to function
calls in glamor_create_texture_from_image(). Add a flag to
glamor_pixmap_fbo that will allow us to provide the correct texture unit
when binding that texture. Also, provide separate copy facet for fbos that
are created for GL_OES_EGL_image_external backed textures. Add a member to
glamor_program_location that allows us to select the correct sampler in the
fragment shader. Extend fs_template with extension member var used to
request the needed extensions in the fragment shader.

Tested on Motorola Droid4 with TI PVR DDK 1.17 closed blobs.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
4 jobs for gbm-bo-render in 4 minutes and 36 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Docker Image
passed debian-buster #6357345

00:00:12

 
  Build And Test
passed autotools #6357346

00:04:23

passed meson #6357347

00:01:07

passed meson-noglamor #6357348

00:00:51