[Mesa-dev] [PATCH 4/4] pipe: Add new bind flag for shared resources with flush_resource call

Axel Davy axel.davy at ens.fr
Wed Oct 21 04:26:30 PDT 2015

On 21/10/2015 13:16, Bas Nieuwenhuizen wrote:
> On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy <axel.davy at ens.fr> wrote:
>> +/* This flag indicates that in addition to being shared, the resource won't be
>> + * read by any external process before we call flush_resource. This allows
>> + * things like compressing the buffer when drawing, while uncompressing on
>> + * flush_resource. The PIPE_BIND_SHARED must still be set with this flag.
>> + * If PIPE_BIND_SHARED is specified but not
>> + * PIPE_BIND_SHARED_FLUSH_RESOURCE, then the resource must be
>> + * readable by external processes after any normal flush. */
> I think these comments would allow the dri2 front buffer to have this
> flag set as it is never shared with another process?
> - Bas
The front buffer is read by the X server, which is another process.

In the case we have a fake front buffer, waitX/waitGL will trigger 
read/writes with the X server real front buffer.

We could advertise the flag for fake front buffers if we were calling 
flush_resource for waitX/waitGL,
but we don't do that.


More information about the mesa-dev mailing list