On 02/18/2011 09:15 AM, jfons...@vmware.com wrote:
From: Keith Whitwell<kei...@vmware.com>
---
src/gallium/include/pipe/p_defines.h | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/gallium/include/pipe/p_defines.h
b/src/gallium/include/pipe/p_defines.h
index f66bbaf..2de707f 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_RANGE = (1<< 8),
Does the second flag replace the first one? Are we keeping the first
one just as a transitory thing? I'd say to either remove the old one
or add a comment explaining what's going on.
/**
* 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)
};
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev