[cairo] [PATCH] gl: fix the same surface bug and cairo_glx_surface_t source surface bug

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 11 06:53:26 PST 2012

On Wed, 11 Jan 2012 22:38:39 +0800, Chuanbo Weng <strgnm at gmail.com> wrote:
> The drawing error is an issue in the output. The "self-copy" and
> "subsurface"
> I mentioned are the cases in cairo/test/: self-copy.c and subsurface.c.
> So you can check the output pictures, which are incorrect.
> These cases use target surface as their source surface at the same time,
> which
> cause the render output incorrect. (When you bind one image from a texture
> to an
> FBO,  and If you do try to read and write to the same image, you get
> undefined
> results.)

And it is equally undefined in cairo at the moment. The self-copy test is
there more to capture how each backend behaves. The consensus has been
towards always performing a snapshot on the source before every
operation (and optimising away that snapshot for the common case where
it is irrelevant).

Does anyone have any objections for cairo to start treating all sources
as immutable even when source == destination?

Chris Wilson, Intel Open Source Technology Centre

More information about the cairo mailing list