[Mesa-dev] [PATCH 09/10] gallium/u_blit: don't release vertex buffer at end of frame / in glFlush

Marek Olšák maraeo at gmail.com
Wed Apr 18 09:30:19 PDT 2012


On Wed, Apr 18, 2012 at 5:06 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
> Marek,
>
> Sorry for not noticing earlier ( I haven't been able to keep up with mesa traffic lately), but I'm afraid this and the 10/10 are not ok, as on several operating systems, namely, Windows WDDM, it is illegal to flush a command buffer with a buffer mapped.

The buffer is not mapped when the flush happens. u_blit uses
pipe_buffer_write_nooverlap, which uses transfer_inline_write, which
goes into u_default_transfer_inline_write on most (if not all)
drivers, which unmaps the resource before the function returns.

The buffer may be mapped with the 'unsynchronized' flag again later
though, so drivers should implement that flag to avoid stalls.

Marek


More information about the mesa-dev mailing list