This function is expected to fail fairly often as it is the tool for
checking if windows are mapped and have a valid pixmap in the linux
capture plugin. So reduce this error to a debug message to avoid
spamming release builds.
This replaces direct OpenGL calls to error handling helpers. Previously
this would cause errors to be misattributed to the next OpenGL functions
called.
Fixes DMA-BUF importing returning a texture on failure on KDE+NVIDIA.
The usual pattern of function signature is "array / n_elements",
but query_dmabuf_formats() does not follow it. Apply this order
to query_dmabuf_formats().
This adds the drmbuf format as a parameter separate from the obs texture
format that will be used. drmbuf's may have a variety of formats that we
need to pass correctly to get a usable texture which may correspond to
multi-platform texture formats.
Implement device_texture_create_from_dmabuf for EGL/X11 and EGL/Wayland.
The code is shared between them, in a new gl-egl-common.c file.
This is currently limited to a few common RGB(A) formats for now, which
seems to cover most use cases.