[RFCv2 9/9] gl-renderer: Clean up EGL image and GL texture destruction.

2012-11-16 Thread John Kåre Alsaker
This also ensures we destroy all EGL images if a plane fails to be created. --- src/gl-renderer.c | 43 +++ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/src/gl-renderer.c b/src/gl-renderer.c index c82bed8..b022ba6 100644 --- a/src/gl-rende

[RFCv2 8/9] gl-renderer: Remove unneeded glActiveTexture call.

2012-11-16 Thread John Kåre Alsaker
--- src/gl-renderer.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gl-renderer.c b/src/gl-renderer.c index 5847e12..c82bed8 100644 --- a/src/gl-renderer.c +++ b/src/gl-renderer.c @@ -1725,8 +1725,6 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)

[RFCv2 7/9] gl-renderer: Don't multiply with alpha uniform when it's 1.0.

2012-11-16 Thread John Kåre Alsaker
This eliminates the multiplication of the alpha uniform for the common case of surfaces with 1.0 as alpha. --- src/gl-internal.h | 1 + src/gl-renderer.c | 14 -- src/gl-shaders.c | 6 +++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/gl-internal.h b/src/gl-

[RFCv2 6/9] gl-renderer: Add support for blending in linear space.

2012-11-16 Thread John Kåre Alsaker
This makes compositing gamma correct by assuming all input surfaces are in the sRGB color space. It can be enabled by setting color-managed to true in the compositor section of weston.ini. It's implemented by converting from sRGB gamma using the new CONVERSION_FROM_SRGB shader attribute and drawi

[RFCv2 5/9] gl-renderer: Adds the ability to draw damage to a texture and in turn to the framebuffer.

2012-11-16 Thread John Kåre Alsaker
--- src/gl-internal.h | 5 ++ src/gl-renderer.c | 170 -- 2 files changed, 158 insertions(+), 17 deletions(-) diff --git a/src/gl-internal.h b/src/gl-internal.h index 83b351f..40f109b 100644 --- a/src/gl-internal.h +++ b/src/gl-internal.h @@ -

[RFCv2 4/9] gl-renderer: Tweak YUV shader.

2012-11-16 Thread John Kåre Alsaker
A more vectorized version of the YUV shader, may or may not be faster. It's also untested... --- src/gl-shaders.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gl-shaders.c b/src/gl-shaders.c index 32bb70d..8595daf 100644 --- a/src/gl-shaders.c +++ b/src/gl

[RFCv2 3/9] gl-renderer: Add optional support for desktop OpenGL.

2012-11-16 Thread John Kåre Alsaker
This adds support for desktop OpenGL which can be enabled by with ./configure --enable-opengl. Most of the differences in API between OpenGL and OpenGL ES is hidden by the new gl_renderer fields. It also accesses GLES2 extensions by including GLES2/gl2platform.h directly. --- configure.ac

[RFCv2 2/9] gl-renderer: Add flexible shader generation.

2012-11-16 Thread John Kåre Alsaker
This add a more flexible way of generating shaders. It generates all valid combinations of different input, conversion and output pipelines, which can easily be extended with more if desired. --- src/gl-internal.h | 65 +++-- src/gl-renderer.c | 68 +++--- src/gl-shaders.c | 696 +++

[RFCv2 1/9] gl-renderer: Move shader functions into it's own file.

2012-11-16 Thread John Kåre Alsaker
This moves all shader functions into it's own file in preparation of a more flexible shader generation. It adds gl-internal.h for shared definitions between the files. --- src/Makefile.am | 2 + src/gl-internal.h | 138 src/gl-renderer.c | 376 ++---

[RFCv2 0/9] Adding gamma correct compositing

2012-11-16 Thread John Kåre Alsaker
Previous RFC: http://lists.freedesktop.org/archives/wayland-devel/2012-November/006244.html This is the set of patches which adds more flexible shader generation, adds support for desktop OpenGL and finally adds gamma correct compositing which depends on the former two. The most problematic com

Re: [PATCH wayland 1/2 v2] protocol: Add resize from center flag.

2012-11-16 Thread Kristian Høgsberg
On Thu, Nov 15, 2012 at 01:38:54PM -0700, Scott Moreau wrote: > On Thu, Nov 15, 2012 at 1:02 PM, Scott Moreau wrote: > > > > > > > On Thu, Nov 15, 2012 at 12:57 PM, Bill Spitzak wrote: > > > >> A scheme I have seen is to use 15 (ie all 4 edge flags or'd) for > >> center-resize. This makes it pos

Re: [PATCH 2/3] simple-egl: Set the right size for the opaque region when fullscreen

2012-11-16 Thread Kristian Høgsberg
On Fri, Nov 16, 2012 at 05:42:26PM +0200, Ander Conselvan de Oliveira wrote: > Ping? Just noticed (again) today that we set the wrong opaque region > with simple-egl when fullscreen. Oh, ok, I think I lost track of that one in the simple-egl opaque discussion. Thanks for the reminder. Kristian

Re: [PATCH weston] compositor: Move buffer damage fields from weston_output to gl-renderer

2012-11-16 Thread Kristian Høgsberg
On Fri, Nov 16, 2012 at 05:50:38PM +0200, Ander Conselvan de Oliveira wrote: > On 11/16/2012 05:37 PM, Pekka Paalanen wrote: > >On Fri, 16 Nov 2012 17:23:52 +0200 > >Ander Conselvan de Oliveira > >wrote: > > > >>Move fields current_buffer and buffer_damage out of weston_output into > >>gl_output_s

Re: [PATCH weston 1/2] compositor-drm: Don't use overlay when surface alpha != 1.0f

2012-11-16 Thread Kristian Høgsberg
On Fri, Nov 16, 2012 at 11:48:46AM +0200, Ander Conselvan de Oliveira wrote: > From: Ville Syrjälä > > Assume that overlays can't handle alpha blending even with a constant > alpha factor. Thanks, both look good. Kristian > Signed-off-by: Ville Syrjälä > --- > src/compositor-drm.c |3 +++

Re: Problems with the newest wayland git

2012-11-16 Thread Bill Spitzak
If this does not sound like a known problem, I can get some stack and message dumps of the programs as they fail and try to debug it. Pekka Paalanen wrote: On Thu, 15 Nov 2012 23:35:57 -0800 Bill Spitzak wrote: This is not working very well for me. Most things point to EGL not working, but t

Re: Problems with the newest wayland git

2012-11-16 Thread Bill Spitzak
Pekka Paalanen wrote: On Thu, 15 Nov 2012 23:35:57 -0800 Bill Spitzak wrote: This is not working very well for me. Most things point to EGL not working, but there are some strange problems. What did you update first before you noticed it broke? I updated and recompiled all of wayland, me

Re: [PATCH weston] compositor: Move buffer damage fields from weston_output to gl-renderer

2012-11-16 Thread Ander Conselvan de Oliveira
On 11/16/2012 05:37 PM, Pekka Paalanen wrote: On Fri, 16 Nov 2012 17:23:52 +0200 Ander Conselvan de Oliveira wrote: Move fields current_buffer and buffer_damage out of weston_output into gl_output_state, since they are actually specific to the renderer. Also bring back the previous_damage fie

Re: [PATCH 2/3] simple-egl: Set the right size for the opaque region when fullscreen

2012-11-16 Thread Ander Conselvan de Oliveira
Ping? Just noticed (again) today that we set the wrong opaque region with simple-egl when fullscreen. On 09/07/2012 05:32 PM, Ander Conselvan de Oliveira wrote: window.window_size holds the size of the window in windowed mode. Use window.geometry for setting the opaque region since that holds t

Re: [PATCH weston] compositor: Move buffer damage fields from weston_output to gl-renderer

2012-11-16 Thread Pekka Paalanen
On Fri, 16 Nov 2012 17:23:52 +0200 Ander Conselvan de Oliveira wrote: > Move fields current_buffer and buffer_damage out of weston_output into > gl_output_state, since they are actually specific to the renderer. > > Also bring back the previous_damage field so that the screenshooter > can get th

[PATCH weston] compositor: Move buffer damage fields from weston_output to gl-renderer

2012-11-16 Thread Ander Conselvan de Oliveira
Move fields current_buffer and buffer_damage out of weston_output into gl_output_state, since they are actually specific to the renderer. Also bring back the previous_damage field so that the screenshooter can get the damage for the previous frame in a renderer independent way. --- src/compositor

[PATCH weston 2/2] shell/zoom: Increment/decrement disable_planes only when zoom.active changes

2012-11-16 Thread Ander Conselvan de Oliveira
From: Ville Syrjälä disable_planes should only be incremented when zoom.active actually toggles. Otherwise the counter will be incremented too many times, and planes will no longer get used. Signed-off-by: Ville Syrjälä Signed-off-by: Ander Conselvan de Oliveira --- src/shell.c |2 +- sr

[PATCH weston 1/2] compositor-drm: Don't use overlay when surface alpha != 1.0f

2012-11-16 Thread Ander Conselvan de Oliveira
From: Ville Syrjälä Assume that overlays can't handle alpha blending even with a constant alpha factor. Signed-off-by: Ville Syrjälä --- src/compositor-drm.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 2adec61..73a0c52 100644 ---

Re: Problems with the newest wayland git

2012-11-16 Thread Pekka Paalanen
On Thu, 15 Nov 2012 23:35:57 -0800 Bill Spitzak wrote: > This is not working very well for me. Most things point to EGL not > working, but there are some strange problems. What did you update first before you noticed it broke? Are you sure you do not have any outdated weston components lying a