Draft: Flush imported dmabufs at glFinish
Commit message
When imported dmabufs are rendered to, the writes aren't guaranteed to be available to an external client unless one of the GL-provided synchronization methods are used. This patch flushes imported dmabufs when glFinish is used. Support for fences is ommitted due to a lack of tests.
Testing was done with the iris driver, a wlroots example program ("simple"), and the following piglit test binaries:
- ext_image_dma_buf_import-intel_external_sampler_only
- egl-ext_egl_image_storage
Closes: #3425 (closed)