[Mesa-dev] [PATCH] r600g: Various patches

Marek Olšák maraeo at gmail.com
Sun Jun 12 07:53:08 PDT 2011


2011/6/12 Mathias Fröhlich <Mathias.Froehlich at gmx.net>:
> 0005-r600g-Make-use-of-PIPE_TRANSFER_DISCARD_WHOLE_RESOUR.patch:
> This makes use of the DISCARD_WHOLE_RESOURCE flag for memory mappings.

That won't work. The old buffer may still be set as a vertex
buffer/texture. If you replace the whole buffer like that, all the
states in all existing pipe contexts where the old buffer is set in
must be re-emitted as well (e.g. by marking them as dirty), which is unfun.

A simplier way to implement the DISCARD flag is to create a temporary
buffer for the new data and make the gpu copy it to the original one
(like we do for textures). However we don't have accelerated
copy_region for buffers yet.

Marek


More information about the mesa-dev mailing list