projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
baab835
)
gallium/util: Use PIPE_TRANSFER_DISCARD_RANGE in pipe_buffer_write.
author
Mathias Fröhlich
<Mathias.Froehlich@web.de>
Thu, 10 Mar 2011 05:46:32 +0000
(06:46 +0100)
committer
Marek Olšák
<maraeo@gmail.com>
Tue, 15 Mar 2011 14:39:38 +0000
(15:39 +0100)
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>
src/gallium/auxiliary/util/u_inlines.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_inlines.h
b/src/gallium/auxiliary/util/u_inlines.h
index aed8ba7df43c096bd97ce1f99c62ecb67c623ddf..ddb81b5b95700df0f9c768507524b83d996886e4 100644
(file)
--- 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);