aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/docs/source
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-12-19 20:06:51 +0100
committerAxel Davy <[email protected]>2016-12-20 23:44:20 +0100
commitc4268fd175336f91e571f9060c9ad1f167132574 (patch)
treebb9e9d11c5a6092b3a63bf6f3cfda3b1d9ad4e82 /src/gallium/docs/source
parent1736ef65701d915cb5c4c7e489d35da4df47b58e (diff)
gallium-docs: Add documentation for when using several contexts
Add documentation to explicit what can be expected and what is allowed when using several contexts. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/docs/source')
-rw-r--r--src/gallium/docs/source/context.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst
index e190cefc851..35f51a09410 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -707,3 +707,26 @@ notifications are single-shot, i.e. subsequent calls to
since the last call or since the last notification by callback.
* ``set_device_reset_callback`` sets a callback which will be called when
a device reset is detected. The callback is only called synchronously.
+
+Using several contexts
+----------------------
+
+Several contexts from the same screen can be used at the same time. Objects
+created on one context cannot be used in another context, but the objects
+created by the screen methods can be used by all contexts.
+
+Transfers
+^^^^^^^^^
+A transfer on one context is not expected to synchronize properly with
+rendering on other contexts, thus only areas not yet used for rendering should
+be locked.
+
+A flush is required after transfer_unmap to expect other contexts to see the
+uploaded data, unless:
+
+* Using persistent mapping. Associated with coherent mapping, unmapping the
+ resource is also not required to use it in other contexts. Without coherent
+ mapping, memory_barrier(PIPE_BARRIER_MAPPED_BUFFER) should be called on the
+ context that has mapped the resource. No flush is required.
+
+* Mapping the resource with PIPE_TRANSFER_MAP_DIRECTLY.