Pbuffer swap behavior on EGL surfaceless platform
I am brewing a test for Weston at wayland/weston!529 (merged) . The test runs on EGL surfaceless platform and creates a pbuffer EGLSurface. For the test to work, I need the swap behavior on the pbuffer surface to be EGL_BUFFER_PRESERVED
. I have a Weston patch that explicitly attempts to set this.
The test itself works. It looks like swap behavior indeed is EGL_BUFFER_PRESERVED
. The problem is that when queried, EGL tells me the behavior is EGL_BUFFER_DESTROYED
.
I believe EGL should return EGL_BUFFER_PRESERVED
. After all, it's a pbuffer and its contents won't be destroyed by eglSwapBuffers()
, right?
I am testing with
GL version: OpenGL ES 3.2 Mesa 21.1.0-devel (git-eeaf7b51f3)
GLSL version: OpenGL ES GLSL ES 3.20
GL vendor: AMD
GL renderer: Radeon RX 550 Series (POLARIS11, DRM 3.27.0, 4.19.0-13-amd64, LLVM 8.0.1)
The result is the same when forced to llvmpipe.
Relying on swap behavior is actually a workaround for EGL surfaceless platform not supporting EGL_EXT_buffer_age
. If buffer age was supported, that would work too if it returned age 1 after the initial swapbuffers.