summarylogtreecommitdiffstats
path: root/0001-gl-renderer-Renaming-of-things-and-minor-improvement.patch
diff options
context:
space:
mode:
authorAaron Plattner2016-03-23 15:26:21 -0700
committerAaron Plattner2016-03-23 15:39:38 -0700
commit57673850b273dcf3db6c85abe9bc1d45d090eaf4 (patch)
treed2c8d2c105402dc8c1508a8a902658207d9e2e0c /0001-gl-renderer-Renaming-of-things-and-minor-improvement.patch
parentfe7908b6f16617ee43b0ea601c738ff4ed760b7a (diff)
downloadaur-57673850b273dcf3db6c85abe9bc1d45d090eaf4.tar.gz
Apply Miguel's patches to add support for EGLStreams
See https://lists.freedesktop.org/archives/wayland-devel/2016-March/027547.html Use weston-launch -- --use-egldevice to start. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to '0001-gl-renderer-Renaming-of-things-and-minor-improvement.patch')
-rw-r--r--0001-gl-renderer-Renaming-of-things-and-minor-improvement.patch212
1 files changed, 212 insertions, 0 deletions
diff --git a/0001-gl-renderer-Renaming-of-things-and-minor-improvement.patch b/0001-gl-renderer-Renaming-of-things-and-minor-improvement.patch
new file mode 100644
index 00000000000..ae7acd6ca07
--- /dev/null
+++ b/0001-gl-renderer-Renaming-of-things-and-minor-improvement.patch
@@ -0,0 +1,212 @@
+From 50b2478345ae978143364abde179080a36479e94 Mon Sep 17 00:00:00 2001
+From: "Miguel A. Vico" <mvicomoya@nvidia.com>
+Date: Mon, 21 Mar 2016 17:37:31 +0100
+Subject: [PATCH 1/7] gl-renderer: Renaming of things and minor improvements
+X-NVConfidentiality: public
+
+In preparation for follow-on changes to support frame presentation
+through EGLDevice+EGLOutput, this change includes the following:
+ -Rename gl_renderer_output_create to gl_renderer_output_window_create
+ -Add <platform_attribs> argument to gl_renderer_create
+ -Rename <attribs> argument for gl_renderer_create() and
+ gl_renderer_output_window_create() to <config_attribs>
+ -Accept non-NULL empty <visual_id> arrays (n_ids == 0) both in
+ gl_renderer_create() and gl_renderer_output_window_create()
+
+Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+---
+ src/compositor-drm.c | 3 ++-
+ src/compositor-fbdev.c | 3 ++-
+ src/compositor-wayland.c | 3 ++-
+ src/compositor-x11.c | 4 ++--
+ src/gl-renderer.c | 18 +++++++++---------
+ src/gl-renderer.h | 7 ++++---
+ 6 files changed, 21 insertions(+), 17 deletions(-)
+
+diff --git a/src/compositor-drm.c b/src/compositor-drm.c
+index 538e56eb58ba..ded15f83c3e6 100644
+--- a/src/compositor-drm.c
++++ b/src/compositor-drm.c
+@@ -1588,6 +1588,7 @@ drm_backend_create_gl_renderer(struct drm_backend *b)
+ if (gl_renderer->create(b->compositor,
+ EGL_PLATFORM_GBM_KHR,
+ (void *)b->gbm,
++ NULL,
+ gl_renderer->opaque_attribs,
+ format,
+ n_formats) < 0) {
+@@ -1852,7 +1853,7 @@ drm_output_init_egl(struct drm_output *output, struct drm_backend *b)
+
+ if (format[1])
+ n_formats = 2;
+- if (gl_renderer->output_create(&output->base,
++ if (gl_renderer->output_window_create(&output->base,
+ (EGLNativeWindowType)output->surface,
+ output->surface,
+ gl_renderer->opaque_attribs,
+diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
+index 36d7ae0ae500..84435b7f2fbd 100644
+--- a/src/compositor-fbdev.c
++++ b/src/compositor-fbdev.c
+@@ -526,7 +526,7 @@ fbdev_output_create(struct fbdev_backend *backend,
+ goto out_hw_surface;
+ } else {
+ setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
+- if (gl_renderer->output_create(&output->base,
++ if (gl_renderer->output_window_create(&output->base,
+ (EGLNativeWindowType)NULL, NULL,
+ gl_renderer->opaque_attribs,
+ NULL, 0) < 0) {
+@@ -799,6 +799,7 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
+
+ if (gl_renderer->create(compositor, NO_EGL_PLATFORM,
+ EGL_DEFAULT_DISPLAY,
++ NULL,
+ gl_renderer->opaque_attribs,
+ NULL, 0) < 0) {
+ weston_log("gl_renderer_create failed.\n");
+diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
+index d1c020d886a1..d38376a9ee38 100644
+--- a/src/compositor-wayland.c
++++ b/src/compositor-wayland.c
+@@ -657,7 +657,7 @@ wayland_output_init_gl_renderer(struct wayland_output *output)
+ return -1;
+ }
+
+- if (gl_renderer->output_create(&output->base,
++ if (gl_renderer->output_window_create(&output->base,
+ output->gl.egl_window,
+ output->gl.egl_window,
+ gl_renderer->alpha_attribs,
+@@ -2250,6 +2250,7 @@ wayland_backend_create(struct weston_compositor *compositor, int use_pixman,
+ if (gl_renderer->create(compositor,
+ EGL_PLATFORM_WAYLAND_KHR,
+ b->parent.wl_display,
++ NULL,
+ gl_renderer->alpha_attribs,
+ NULL,
+ 0) < 0) {
+diff --git a/src/compositor-x11.c b/src/compositor-x11.c
+index 13a5d7304568..bc35db66f6fc 100644
+--- a/src/compositor-x11.c
++++ b/src/compositor-x11.c
+@@ -932,7 +932,7 @@ x11_backend_create_output(struct x11_backend *b, int x, int y,
+ * but eglCreateWindowSurface takes a Window. */
+ Window xid = (Window) output->window;
+
+- ret = gl_renderer->output_create(&output->base,
++ ret = gl_renderer->output_window_create(&output->base,
+ (EGLNativeWindowType) output->window,
+ &xid,
+ gl_renderer->opaque_attribs,
+@@ -1562,7 +1562,7 @@ init_gl_renderer(struct x11_backend *b)
+ return -1;
+
+ ret = gl_renderer->create(b->compositor, EGL_PLATFORM_X11_KHR, (void *) b->dpy,
+- gl_renderer->opaque_attribs, NULL, 0);
++ NULL, gl_renderer->opaque_attribs, NULL, 0);
+
+ return ret;
+ }
+diff --git a/src/gl-renderer.c b/src/gl-renderer.c
+index cb083448bfdb..0c55e0b9ebd2 100644
+--- a/src/gl-renderer.c
++++ b/src/gl-renderer.c
+@@ -2493,7 +2493,7 @@ egl_choose_config(struct gl_renderer *gr, const EGLint *attribs,
+ goto out;
+ }
+
+- if (!visual_id)
++ if (!visual_id || n_ids == 0)
+ config_index = 0;
+
+ for (i = 0; config_index == -1 && i < n_ids; i++)
+@@ -2547,10 +2547,10 @@ static int
+ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface);
+
+ static int
+-gl_renderer_output_create(struct weston_output *output,
++gl_renderer_output_window_create(struct weston_output *output,
+ EGLNativeWindowType window_for_legacy,
+ void *window_for_platform,
+- const EGLint *attribs,
++ const EGLint *config_attribs,
+ const EGLint *visual_id,
+ int n_ids)
+ {
+@@ -2560,7 +2560,7 @@ gl_renderer_output_create(struct weston_output *output,
+ EGLConfig egl_config;
+ int i;
+
+- if (egl_choose_config(gr, attribs, visual_id,
++ if (egl_choose_config(gr, config_attribs, visual_id,
+ n_ids, &egl_config) == -1) {
+ weston_log("failed to choose EGL config for output\n");
+ return -1;
+@@ -2846,8 +2846,8 @@ platform_to_extension(EGLenum platform)
+
+ static int
+ gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
+- void *native_window, const EGLint *attribs,
+- const EGLint *visual_id, int n_ids)
++ void *native_window, const EGLint* platform_attribs,
++ const EGLint *config_attribs, const EGLint *visual_id, int n_ids)
+ {
+ struct gl_renderer *gr;
+ EGLint major, minor;
+@@ -2889,7 +2889,7 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
+ if (get_platform_display && platform) {
+ gr->egl_display = get_platform_display(platform,
+ native_window,
+- NULL);
++ platform_attribs);
+ }
+ }
+
+@@ -2910,7 +2910,7 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
+ goto fail_with_error;
+ }
+
+- if (egl_choose_config(gr, attribs, visual_id,
++ if (egl_choose_config(gr, config_attribs, visual_id,
+ n_ids, &gr->egl_config) < 0) {
+ weston_log("failed to choose EGL config\n");
+ goto fail_terminate;
+@@ -3121,7 +3121,7 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
+
+ .create = gl_renderer_create,
+ .display = gl_renderer_display,
+- .output_create = gl_renderer_output_create,
++ .output_window_create = gl_renderer_output_window_create,
+ .output_destroy = gl_renderer_output_destroy,
+ .output_surface = gl_renderer_output_surface,
+ .output_set_border = gl_renderer_output_set_border,
+diff --git a/src/gl-renderer.h b/src/gl-renderer.h
+index 71f6b46e49e1..af8dd267e700 100644
+--- a/src/gl-renderer.h
++++ b/src/gl-renderer.h
+@@ -78,16 +78,17 @@ struct gl_renderer_interface {
+ int (*create)(struct weston_compositor *ec,
+ EGLenum platform,
+ void *native_window,
+- const EGLint *attribs,
++ const EGLint *platform_attribs,
++ const EGLint *config_attribs,
+ const EGLint *visual_id,
+ const int n_ids);
+
+ EGLDisplay (*display)(struct weston_compositor *ec);
+
+- int (*output_create)(struct weston_output *output,
++ int (*output_window_create)(struct weston_output *output,
+ EGLNativeWindowType window_for_legacy,
+ void *window_for_platform,
+- const EGLint *attribs,
++ const EGLint *config_attribs,
+ const EGLint *visual_id,
+ const int n_ids);
+
+--
+2.7.4
+