summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_defines.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-06-30 15:07:10 +0100
committerJosé Fonseca <[email protected]>2009-06-30 15:33:53 +0100
commit4ffe2844a46bcd69c0f2c95f04da97e83899e831 (patch)
tree86e9bd1438206bf4f1e702f6fd9f018f578efaea /src/gallium/include/pipe/p_defines.h
parent4e43126a5915b1233c89c61400c8270d23d48ea3 (diff)
gallium: New PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag for buffer_flush_mapped_range.
When a buffer was mapped for write and no explicit flush range was provided the existing semantics were that the whole buffer would be flushed, mostly for backwards compatability with non map-buffer-range aware code. However if the buffer was mapped/unmapped with nothing really written -- something that often happens with the vbo -- we were unnecessarily assuming that the whole buffer was written. The new PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag (based from ARB_map_buffer_range 's GL_MAP_FLUSH_EXPLICIT_BIT flag) allows to clearly distinguish the legacy usage from the nothing written usage.
Diffstat (limited to 'src/gallium/include/pipe/p_defines.h')
-rw-r--r--src/gallium/include/pipe/p_defines.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index ab57ed73c4c..5c16884c16f 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -217,6 +217,7 @@ enum pipe_transfer_usage {
#define PIPE_BUFFER_USAGE_CONSTANT (1 << 7)
#define PIPE_BUFFER_USAGE_DISCARD (1 << 8)
#define PIPE_BUFFER_USAGE_DONTBLOCK (1 << 9)
+#define PIPE_BUFFER_USAGE_FLUSH_EXPLICIT (1 << 10) /**< See pipe_screen::buffer_flush_mapped_range */
/** Pipe driver custom usage flags should be greater or equal to this value */
#define PIPE_BUFFER_USAGE_CUSTOM (1 << 16)