summaryrefslogtreecommitdiffstats
path: root/src/gallium/docs/source/screen.rst
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-02-03 03:21:29 +0100
committerMarek Olšák <[email protected]>2014-02-06 17:30:00 +0100
commiteeb5a4a50e1317a7f8d9e168c962ce3b1d7b36f9 (patch)
tree8678a3a93a4b3595c1aadf391c7e9d48789c3928 /src/gallium/docs/source/screen.rst
parented84fb3167aa3a048dedaf7cbd865e306b971d50 (diff)
gallium: define the behavior of PIPE_USAGE_* flags properly
STATIC will be removed in the following commit. v2: changed the definition of IMMUTABLE Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/docs/source/screen.rst')
-rw-r--r--src/gallium/docs/source/screen.rst18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index ed8e8322e8f..0c9c2749dfe 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -340,12 +340,18 @@ PIPE_USAGE_*
^^^^^^^^^^^^
The PIPE_USAGE enums are hints about the expected usage pattern of a resource.
-
-* ``PIPE_USAGE_DEFAULT``: Expect many uploads to the resource, intermixed with draws.
-* ``PIPE_USAGE_DYNAMIC``: Expect many uploads to the resource, intermixed with draws.
-* ``PIPE_USAGE_STATIC``: Same as immutable (?)
-* ``PIPE_USAGE_IMMUTABLE``: Resource will not be changed after first upload.
-* ``PIPE_USAGE_STREAM``: Upload will be followed by draw, followed by upload, ...
+Note that drivers must always support read and write CPU access at any time
+no matter which hint they got.
+
+* ``PIPE_USAGE_DEFAULT``: Optimized for fast GPU access.
+* ``PIPE_USAGE_IMMUTABLE``: Optimized for fast GPU access and the resource is
+ not expected to be mapped or changed (even by the GPU) after the first upload.
+* ``PIPE_USAGE_DYNAMIC``: Expect frequent write-only CPU access. What is
+ uploaded is expected to be used at least several times by the GPU.
+* ``PIPE_USAGE_STATIC``: Same as PIPE_USAGE_DEFAULT.
+* ``PIPE_USAGE_STREAM``: Expect frequent write-only CPU access. What is
+ uploaded is expected to be used only once by the GPU.
+* ``PIPE_USAGE_STAGING``: Optimized for fast CPU access.
Methods