mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
egl: set preserved behavior for surface only if config supports it
Otherwise we can end up with mismatching behavior between config and surface when client queries surface attributes. As example, configs for DRI3 do not support preserved behavior but here we were setting preserved behavior for pixmap and pbuffer. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98326 Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Chad Versace <chadversary@chromium.org> Tested-by: Mark Janes <mark.a.janes@intel.com>
This commit is contained in:
parent
671da8d8ba
commit
2035930966
1 changed files with 5 additions and 1 deletions
|
|
@ -262,9 +262,13 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
|
|||
{
|
||||
const char *func;
|
||||
EGLint renderBuffer = EGL_BACK_BUFFER;
|
||||
EGLint swapBehavior = EGL_BUFFER_PRESERVED;
|
||||
EGLint swapBehavior = EGL_BUFFER_DESTROYED;
|
||||
EGLint err;
|
||||
|
||||
/* Swap behavior can be preserved only if config supports this. */
|
||||
if (conf->SurfaceType & EGL_SWAP_BEHAVIOR_PRESERVED_BIT)
|
||||
swapBehavior = EGL_BUFFER_PRESERVED;
|
||||
|
||||
switch (type) {
|
||||
case EGL_WINDOW_BIT:
|
||||
func = "eglCreateWindowSurface";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue