projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05efcee
)
util: Use PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE in pipe_buffer_write.
author
José Fonseca
<jfonseca@vmware.com>
Thu, 10 Feb 2011 20:54:18 +0000
(20:54 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Wed, 9 Mar 2011 11:17:45 +0000
(11:17 +0000)
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 98889fb70ac16d1fa03817b17a1de9dd912310fb..aed8ba7df43c096bd97ce1f99c62ecb67c623ddf 100644
(file)
--- a/
src/gallium/auxiliary/util/u_inlines.h
+++ b/
src/gallium/auxiliary/util/u_inlines.h
@@
-299,13
+299,18
@@
pipe_buffer_write(struct pipe_context *pipe,
const void *data)
{
struct pipe_box box;
+ unsigned usage = PIPE_TRANSFER_WRITE;
+
+ if (offset == 0 && size == buf->width0) {
+ usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
+ }
u_box_1d(offset, size, &box);
pipe->transfer_inline_write( pipe,
buf,
0,
-
PIPE_TRANSFER_WRITE
,
+
usage
,
&box,
data,
size,