[Spice-devel] [PATCH 10/11] spicec: disable stencil test with primary fbo

Marc-André Lureau marcandre.lureau at gmail.com
Tue Sep 24 04:50:58 PDT 2013


Updating commit message for rationale:

The primary buffer doesn't use stencil test. However, this should be
explicitely disabled, since the canvas might change stencil state, and
this will affect primary stencil buffer, making some of further update
operations clipped in unwanted ways.

On Tue, Sep 24, 2013 at 1:42 PM, Marc-André Lureau
<marcandre.lureau at gmail.com> wrote:
> ---
>  client/x11/platform.cpp      | 2 +-
>  client/x11/red_pixmap_gl.cpp | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
> index 475ee6a..b8563b3 100644
> --- a/client/x11/platform.cpp
> +++ b/client/x11/platform.cpp
> @@ -3231,7 +3231,7 @@ void Platform::init()
>              GLX_GREEN_SIZE, 8,
>              GLX_BLUE_SIZE, 8,
>              GLX_ALPHA_SIZE, 8,
> -            GLX_STENCIL_SIZE, 4,
> +            GLX_STENCIL_SIZE, 0,
>              GLX_DEPTH_SIZE, 0,
>              None
>          };
> diff --git a/client/x11/red_pixmap_gl.cpp b/client/x11/red_pixmap_gl.cpp
> index 1a58628..7978a40 100644
> --- a/client/x11/red_pixmap_gl.cpp
> +++ b/client/x11/red_pixmap_gl.cpp
> @@ -246,6 +246,7 @@ void RedPixmapGL::pre_copy()
>      glDisable(GL_BLEND);
>      glDisable(GL_ALPHA_TEST);
>      glDisable(GL_COLOR_LOGIC_OP);
> +    glDisable(GL_STENCIL_TEST);
>
>      glColor3f(1, 1, 1);
>  }
> --
> 1.8.3.1
>



-- 
Marc-André Lureau


More information about the Spice-devel mailing list