diff options
author | Brian Paul <[email protected]> | 2009-08-18 17:55:27 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-08-18 17:55:27 -0600 |
commit | 73fc09a7bf5c63b595251dc10997891c72ecb119 (patch) | |
tree | 3c4a75704a91eb79e2afb2521debff4bd49c3a9d /src/gallium/include/pipe | |
parent | e4aa62a6ce7067269c0befb984bcb8136420cb2c (diff) | |
parent | 3097d7dbf8b6acd2e5f4fd2adf45c5fb85f73952 (diff) |
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r-- | src/gallium/include/pipe/p_inlines.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_inlines.h b/src/gallium/include/pipe/p_inlines.h index cf176c92099..a5c1e8270a3 100644 --- a/src/gallium/include/pipe/p_inlines.h +++ b/src/gallium/include/pipe/p_inlines.h @@ -63,6 +63,13 @@ pipe_buffer_map(struct pipe_screen *screen, if(screen->buffer_map_range) { unsigned offset = 0; unsigned length = buf->size; + + /* XXX: Actually we should be using/detecting DISCARD + * instead of assuming that WRITE implies discard */ + if((usage & PIPE_BUFFER_USAGE_CPU_WRITE) && + !(usage & PIPE_BUFFER_USAGE_DISCARD)) + usage |= PIPE_BUFFER_USAGE_CPU_READ; + return screen->buffer_map_range(screen, buf, offset, length, usage); } else |