summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2011-01-05 17:33:43 +0000
committerJosé Fonseca <[email protected]>2011-02-22 14:13:07 +0000
commitfad8497d3b1cead6f0a5056deaa49350ed4e4d41 (patch)
tree2e6bedfe1e5cb8c499358f7bd72199097d9a413d /src/gallium/include/pipe
parent695cdee67827ee2c11e1445eb2022d3a530f1b23 (diff)
gallium: new transfer flag: DISCARD_WHOLE_RESOURCE
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_defines.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index f66bbaf6674..8b565522d0f 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -229,9 +229,9 @@ enum pipe_transfer_usage {
*
* See also:
* - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag.
- * - Direct3D's D3DLOCK_DISCARD flag.
*/
- PIPE_TRANSFER_DISCARD = (1 << 8),
+ PIPE_TRANSFER_DISCARD = (1 << 8), /* DEPRECATED */
+ PIPE_TRANSFER_DISCARD_RANGE = (1 << 8),
/**
* Fail if the resource cannot be mapped immediately.
@@ -266,7 +266,22 @@ enum pipe_transfer_usage {
* - pipe_context::transfer_flush_region
* - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag.
*/
- PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11)
+ PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11),
+
+ /**
+ * Discards all memory backing the resource.
+ *
+ * It should not be used with PIPE_TRANSFER_CPU_READ.
+ *
+ * This is equivalent to:
+ * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_BUFFER_BIT
+ * - BufferData(NULL) on a GL buffer
+ * - Direct3D's D3DLOCK_DISCARD flag.
+ * - WDDM's D3DDDICB_LOCKFLAGS.Discard flag.
+ * - D3D10 DDI's D3D10_DDI_MAP_WRITE_DISCARD flag
+ * - D3D10's D3D10_MAP_WRITE_DISCARD flag.
+ */
+ PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE = (1 << 12)
};