summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
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/include
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/include')
-rw-r--r--src/gallium/include/pipe/p_defines.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 183726c0666..85385380970 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -356,13 +356,14 @@ enum pipe_flush_flags {
#define PIPE_RESOURCE_FLAG_ST_PRIV (1 << 24) /* state-tracker/winsys private */
/* Hint about the expected lifecycle of a resource.
+ * Sorted according to GPU vs CPU access.
*/
-#define PIPE_USAGE_DEFAULT 0 /* many uploads, draws intermixed */
-#define PIPE_USAGE_DYNAMIC 1 /* many uploads, draws intermixed */
-#define PIPE_USAGE_STATIC 2 /* same as immutable?? */
-#define PIPE_USAGE_IMMUTABLE 3 /* no change after first upload */
-#define PIPE_USAGE_STREAM 4 /* upload, draw, upload, draw */
-#define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */
+#define PIPE_USAGE_DEFAULT 0 /* fast GPU access */
+#define PIPE_USAGE_IMMUTABLE 1 /* fast GPU access, immutable */
+#define PIPE_USAGE_DYNAMIC 2 /* uploaded data is used multiple times */
+#define PIPE_USAGE_STREAM 3 /* uploaded data is used once */
+#define PIPE_USAGE_STAGING 4 /* fast CPU access */
+#define PIPE_USAGE_STATIC 5 /* same as DEFAULT, will be removed */
/**