[PATCH xserver] glamor: Make context current in glamor_pixmap_fbo_cache_put
Dave Airlie
airlied at gmail.com
Fri Mar 11 05:48:37 UTC 2016
On 11 March 2016 at 13:21, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Without this, we may be manipulating the context of another screen.
>
> In a system with two GPUs using glamor, this fixes lots of
>
> (EE) glamor256: GL error: GL_INVALID_OPERATION in glBindTexture(non-gen name)
>
> spew since 0b4c0c75 ('glamor: Replace "finish access" shader with texture
> swizzling').
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>
but not sure I can answer the below q.
> ---
>
> BTW, is fbo->tex guaranteed to be non-0 here?
>
> glamor/glamor_fbo.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
> index d5311a9..a531f60 100644
> --- a/glamor/glamor_fbo.c
> +++ b/glamor/glamor_fbo.c
> @@ -174,6 +174,7 @@ glamor_pixmap_fbo_cache_put(glamor_screen_private *glamor_priv,
> * glamor_picture.c. Don't reset GL_RED -> GL_ALPHA swizzle, though
> */
> if (glamor_priv->has_texture_swizzle && n_format != 2) {
> + glamor_make_current(glamor_priv);
> glBindTexture(GL_TEXTURE_2D, fbo->tex);
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED);
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_GREEN);
> --
> 2.7.0
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list