diff options
author | Hal Gentz <[email protected]> | 2019-10-10 18:35:50 -0600 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2019-10-11 21:57:21 +0000 |
commit | 075a96aa926e6e89795f95a6a59693f44d9ac970 (patch) | |
tree | 81b0142a0494f8325711ab37542bb2f7051e57af /src/egl/main | |
parent | a800d16e4f1589e41e53edf8e8a771a33bb46a6a (diff) |
egl: Configs w/o double buffering support have no `EGL_WINDOW_BIT`.
When users pass a config to `eglCreateWindowSurface` it requests double
buffering, but if the config doesn't have the appropriate `__DRIconfig`,
`eglCreateWindowSurface` fails with a `EGL_BAD_MATCH`.
Given that such behaviour is completely unacceptable, we drop the
`EGL_WINDOW_BIT` if we don't have at least one `__DRIconfig` supporting double
buffering, otherwise dropping the `EGL_PIXMAP_BIT`.
Fixes: 049f343e8ac "egl: Allow 24-bit visuals for 32-bit RGBA8888 configs"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67676
Cc: [email protected]
Reviewed-by: Adam Jackson <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglconfig.c | 10 | ||||
-rw-r--r-- | src/egl/main/eglconfig.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index b3362363664..b15ba758278 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -71,6 +71,16 @@ _eglInitConfig(_EGLConfig *conf, _EGLDisplay *disp, EGLint id) conf->ComponentType = EGL_COLOR_COMPONENT_TYPE_FIXED_EXT; } +/* + * Wipe the configs list and return the old list + */ +_EGLArray * +_eglWipeConfigs(_EGLDisplay *disp) +{ + _EGLArray *configs = disp->Configs; + disp->Configs = NULL; + return configs; +} /** * Link a config to its display and return the handle of the link. diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h index 064187ff1dd..e9b87d98a9d 100644 --- a/src/egl/main/eglconfig.h +++ b/src/egl/main/eglconfig.h @@ -179,6 +179,9 @@ _eglGetConfigKey(const _EGLConfig *conf, EGLint key) extern void _eglInitConfig(_EGLConfig *config, _EGLDisplay *disp, EGLint id); +extern _EGLArray * +_eglWipeConfigs(_EGLDisplay *disp); + extern EGLConfig _eglLinkConfig(_EGLConfig *conf); |