Re: [Mesa-dev] [PATCH 2/2] gallium-docs: Add documentation for when using several contexts

2016-12-20 Thread Marek Olšák
For the series:

Reviewed-by: Marek Olšák 

Marek

On Mon, Dec 19, 2016 at 8:09 PM, Axel Davy  wrote:
> Add documentation to explicit what can be expected and what is allowed
> when using several contexts.
>
> Signed-off-by: Axel Davy 
> ---
>  src/gallium/docs/source/context.rst | 23 +++
>  1 file changed, 23 insertions(+)
>
> diff --git a/src/gallium/docs/source/context.rst 
> b/src/gallium/docs/source/context.rst
> index e190cefc85..35f51a0941 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.
> --
> 2.11.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] gallium-docs: Add documentation for when using several contexts

2016-12-19 Thread Axel Davy
Add documentation to explicit what can be expected and what is allowed
when using several contexts.

Signed-off-by: Axel Davy 
---
 src/gallium/docs/source/context.rst | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/src/gallium/docs/source/context.rst 
b/src/gallium/docs/source/context.rst
index e190cefc85..35f51a0941 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.
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev