summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_inlines.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-17 14:34:50 +0200
committerMarek Olšák <[email protected]>2016-07-23 13:33:42 +0200
commit8e3e9d283976c30a8ba9b51821bc61ddf782e2b0 (patch)
treee3087f09c219c3afe11a7626022e25d11dfe0a00 /src/gallium/auxiliary/util/u_inlines.h
parent1ffe77e7bb2486ea74cda077ed2a9622b758395c (diff)
gallium/util: don't modify usage in pipe_buffer_write
All drivers were already doing it except virgl. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_inlines.h')
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index 07f73546ad7..c2a0b08d151 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -339,15 +339,8 @@ pipe_buffer_write(struct pipe_context *pipe,
unsigned size,
const void *data)
{
- unsigned access = PIPE_TRANSFER_WRITE;
-
- if (offset == 0 && size == buf->width0) {
- access |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
- } else {
- access |= PIPE_TRANSFER_DISCARD_RANGE;
- }
-
- pipe->buffer_subdata(pipe, buf, access, offset, size, data);
+ /* Don't set any other usage bits. Drivers should derive them. */
+ pipe->buffer_subdata(pipe, buf, PIPE_TRANSFER_WRITE, offset, size, data);
}
/**