aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorBrandon Dowdy <berylline@users.noreply.github.com>2021-01-28 23:30:36 +0000
committerSimon Ser <contact@emersion.fr>2021-01-29 10:03:24 +0100
commit8aa38fe73e0866c389fa973dd1e04a82979f55ac (patch)
treef855963cd6ae881b1f7ba2d02982548f39fcf73d /render
parent705b3da7cb469c661a3dd43212b1baf6fe615ec9 (diff)
render/egl: remove *config_attribs and wlr_egl->config
Breaking changes: Both "EGLint *config_attribs" and "wlr_egl->config" no longer exist.
Diffstat (limited to 'render')
-rw-r--r--render/egl.c29
-rw-r--r--render/gles2/renderer.c3
-rw-r--r--render/wlr_renderer.c3
3 files changed, 8 insertions, 27 deletions
diff --git a/render/egl.c b/render/egl.c
index 6cd1b903..4ff1c1b7 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -150,8 +150,7 @@ out:
free(formats);
}
-struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display,
- const EGLint *config_attribs) {
+struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display) {
struct wlr_egl *egl = calloc(1, sizeof(struct wlr_egl));
if (egl == NULL) {
wlr_log_errno(WLR_ERROR, "Allocation failed");
@@ -286,25 +285,11 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display,
check_egl_ext(device_exts_str, "EGL_EXT_device_drm");
}
- if (config_attribs != NULL) {
- EGLint matched = 0;
- if (!eglChooseConfig(egl->display, config_attribs, &egl->config, 1,
- &matched)) {
- wlr_log(WLR_ERROR, "eglChooseConfig failed");
- goto error;
- }
- if (matched == 0) {
- wlr_log(WLR_ERROR, "Failed to match an EGL config");
- goto error;
- }
- } else {
- if (!check_egl_ext(display_exts_str, "EGL_KHR_no_config_context") &&
- !check_egl_ext(display_exts_str, "EGL_MESA_configless_context")) {
- wlr_log(WLR_ERROR, "EGL_KHR_no_config_context or "
- "EGL_MESA_configless_context not supported");
- goto error;
- }
- egl->config = EGL_NO_CONFIG_KHR;
+ if (!check_egl_ext(display_exts_str, "EGL_KHR_no_config_context") &&
+ !check_egl_ext(display_exts_str, "EGL_MESA_configless_context")) {
+ wlr_log(WLR_ERROR, "EGL_KHR_no_config_context or "
+ "EGL_MESA_configless_context not supported");
+ goto error;
}
wlr_log(WLR_INFO, "Using EGL %d.%d", (int)major, (int)minor);
@@ -339,7 +324,7 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display,
attribs[atti++] = EGL_NONE;
assert(atti <= sizeof(attribs)/sizeof(attribs[0]));
- egl->context = eglCreateContext(egl->display, egl->config,
+ egl->context = eglCreateContext(egl->display, EGL_NO_CONFIG_KHR,
EGL_NO_CONTEXT, attribs);
if (egl->context == EGL_NO_CONTEXT) {
wlr_log(WLR_ERROR, "Failed to create EGL context");
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index 59d46a91..f385762d 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -466,9 +466,6 @@ static enum wl_shm_format gles2_preferred_read_format(
glGetRenderbufferParameteriv(GL_RENDERBUFFER,
GL_RENDERBUFFER_ALPHA_SIZE, &alpha_size);
glBindRenderbuffer(GL_RENDERBUFFER, 0);
- } else if (renderer->egl->config != EGL_NO_CONFIG_KHR) {
- eglGetConfigAttrib(renderer->egl->display, renderer->egl->config,
- EGL_ALPHA_SIZE, &alpha_size);
}
const struct wlr_gles2_pixel_format *fmt =
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index 4a565b1d..4bbbaf59 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -257,8 +257,7 @@ struct wlr_renderer *wlr_renderer_autocreate_with_drm_fd(int drm_fd) {
return NULL;
}
- struct wlr_egl *egl = wlr_egl_create(EGL_PLATFORM_GBM_KHR, gbm_device,
- NULL);
+ struct wlr_egl *egl = wlr_egl_create(EGL_PLATFORM_GBM_KHR, gbm_device);
if (egl == NULL) {
wlr_log(WLR_ERROR, "Could not initialize EGL");
gbm_device_destroy(gbm_device);