summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-01-02 01:13:15 +0100
committerMarek Olšák <[email protected]>2012-01-05 18:29:11 +0100
commit0950086376b1c8b7fb89eda81ed7f2f06dee58bc (patch)
tree0ca11705eb95036df1590d2fda13239f684d6dee /src/gallium/include/pipe
parent7cd1c62b6be88072e3d937b67c499592490927f1 (diff)
gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY
Please see the diff for further info. This paves the way for moving user buffer uploads out of drivers and should allow to clean up the mess in u_upload_mgr in the meantime. For now only allowed for buffers on r300 and r600. Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_defines.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 3b3940db893..91d8b1e4525 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -226,6 +226,22 @@ enum pipe_transfer_usage {
PIPE_TRANSFER_MAP_DIRECTLY = (1 << 2),
/**
+ * The transfer should map the resource storage directly and the GPU should
+ * be able to see what the CPU has written. Such a storage may stay mapped
+ * while issuing draw commands which use it. The only allowed usage is
+ * non-overlapping writes which are suballocated out of a big buffer.
+ * The minimum allowed alignment of suballocations is 256 bytes (this is
+ * a subject to change).
+ * The flag is intended to be used to avoid mapping and unmapping
+ * resources repeatedly when doing uploads and draws intermixed.
+ *
+ * The driver may return NULL if that isn't possible, and the state
+ * tracker needs to cope with that and use an alternative path
+ * without this flag.
+ */
+ PIPE_TRANSFER_MAP_PERMANENTLY = (1 << 3),
+
+ /**
* Discards the memory within the mapped region.
*
* It should not be used with PIPE_TRANSFER_READ.