summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathias Fröhlich <Mathias.Froehlich@web.de>2011-03-10 06:46:32 +0100
committerMarek Olšák <maraeo@gmail.com>2011-03-15 15:39:38 +0100
commit65942e141fc3da760b53248eafdd876a45b592d4 (patch)
treeaed92c754d1a74a47d57dea0b4ad05646cf3abd0 /src
parentbaab835a1f11d026bd757d99ff05b59971042a3e (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index aed8ba7df4..ddb81b5b95 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -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);