Added GpuBuffer::WritePolicy
The write policy tells the GpuBuffer what to do with the Graphics::Buffer object
during updating buffer content. It's possible to:
- RETAIN the content
- DISCARD the content
Both options have performance implications. Retaining the content may cause blocking the access to the buffer by the GPU driver in case the buffer is currently in use by the GPU. Frequent buffer updates may cause a massive performance hit. This policy allows writing a partial updates into the buffer.
Discarding the content means orphaning an underlying memory and allocating new buffer storage so it can be accessed immediately while GPU may be finishing work with the old content. The downside of it is no partial updates are possible. Area of buffer which isn't updated stays undefined. This policy is made for frequent updates (every frame).
Change-Id: Ic0e80d7b23208a455129c16fb3e23a4020791b50