gallium/util: Use PIPE_TRANSFER_DISCARD_RANGE in pipe_buffer_write.
Additionally, to discarding the whole buffer, use PIPE_TRANSFER_DISCARD_RANGE in pipe_buffer_write when the write covers only part of the buffer. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
parent
baab835a1f
commit
65942e141f
1 changed files with 2 additions and 0 deletions
|
|
@ -303,6 +303,8 @@ pipe_buffer_write(struct pipe_context *pipe,
|
|||
|
||||
if (offset == 0 && size == buf->width0) {
|
||||
usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
|
||||
} else {
|
||||
usage |= PIPE_TRANSFER_DISCARD_RANGE;
|
||||
}
|
||||
|
||||
u_box_1d(offset, size, &box);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue