opengl interop: Implement exporting and importing through EGL and dmabuf.

- export: create an EGLImage from the texture, and export it as a dmabuf fd
- import: create an EGLImage from the fd, and use it to create the texture

Implement a test case for opengl.

videolan/libplacebo#80
11 jobs for opengl-interop-egldmabuf in 25 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
failed #420312
aarch64 docker
build-aarch64

00:00:24

failed #420313
macos
build-macos

00:00:06

failed #420308
amd64 docker
build-ubuntu

00:00:17

failed #420309
amd64 docker
build-ubuntu-static

00:00:17

failed #420310
amd64 docker
build-win32

00:00:15

failed #420311
amd64 docker
build-win64

00:00:13

 
  Test
skipped #420315
gpu
test-gpu
skipped #420316
gpu
test-gpu-asan
skipped #420317
gpu
test-gpu-msan
skipped #420318
gpu
test-gpu-ubsan
skipped #420314
amd64 docker
test-ubuntu-scan
 
Name Stage Failure
failed
build-aarch64 Build
Run-time dependency vulkan found: YES 
Found CMake: /usr/bin/cmake (3.13.4)
Run-time dependency epoxy found: NO (tried pkgconfig and cmake)
Run-time dependency egl found: NO (tried cmake)

src/meson.build:22:0: ERROR: Pkg-config binary for machine MachineChoice.HOST not found. Giving up.

A full log can be found at /builds/vliaskov/libplacebo/build/meson-logs/meson-log.txt
ERROR: Job failed: exit code 1
failed
build-ubuntu-static Build
../src/opengl/gpu.c:581:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
581 | ctx, egltarget, (EGLClientBuffer)(tex_gl->texture), attribs);
| ^
cc1: all warnings being treated as errors
[49/60] Compiling C object 'src/25a6634@@placebo@sta/renderer.c.o'
[50/60] Compiling C++ object 'src/25a6634@@placebo@sta/glsl_glslang.cc.o'
[51/60] Compiling C object 'src/25a6634@@placebo@sta/vulkan_gpu.c.o'
ninja: build stopped: subcommand failed.
ERROR: Job failed: exit code 1
failed
build-ubuntu Build
../src/opengl/gpu.c:581:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
581 | ctx, egltarget, (EGLClientBuffer)(tex_gl->texture), attribs);
| ^
cc1: all warnings being treated as errors
[49/61] Compiling C object 'src/25a6634@@placebo@sha/renderer.c.o'
[50/61] Compiling C object 'src/25a6634@@placebo@sha/vulkan_gpu.c.o'
[51/61] Compiling C++ object 'src/25a6634@@placebo@sha/glsl_glslang.cc.o'
ninja: build stopped: subcommand failed.
ERROR: Job failed: exit code 1
failed
build-win32 Build
Run-time dependency vulkan found: NO (tried pkgconfig and system)
Found CMake: NO
Run-time dependency epoxy found: NO (tried pkgconfig and cmake)
Run-time dependency egl found: NO

src/meson.build:22:0: ERROR: Pkg-config binary for machine MachineChoice.HOST not found. Giving up.

A full log can be found at /builds/vliaskov/libplacebo/build/meson-logs/meson-log.txt
ERROR: Job failed: exit code 1
failed
build-win64 Build
Run-time dependency epoxy found: NO (tried pkgconfig and cmake)
Run-time dependency egl found: NO

src/meson.build:22:0: ERROR: Pkg-config binary for machine MachineChoice.HOST not found. Giving up.

A full log can be found at /builds/vliaskov/libplacebo/build/meson-logs/meson-log.txt
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1
failed
build-macos Build
Run-time dependency vulkan found: NO (tried pkgconfig and system)
Found CMake: /Users/videolan/sandbox/bin/cmake (3.13.4)
Run-time dependency epoxy found: NO (tried pkgconfig, cmake and framework)
Run-time dependency egl found: NO (tried pkgconfig, cmake and framework)

src/meson.build:22:0: ERROR: Dependency "egl" not found, tried pkgconfig, cmake and framework

A full log can be found at /Users/videolan/builds/NYJGMvSd/0/vliaskov/libplacebo/build/meson-logs/meson-log.txt
ERROR: Job failed: exit status 1