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:
committed by
Marek Olšák
parent
baab835a1f
commit
65942e141f
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user