summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-11-24 13:45:19 +0900
committerJosé Fonseca <[email protected]>2008-11-24 13:45:19 +0900
commitd600c805c08288757185ce3af24b5f0a866bb0b2 (patch)
treecf6e95d6538792ad269229a9289f3b54959bd5c9 /src/gallium
parent52e9c9770ac47e9d92df208ec5cfd4e004c45f3d (diff)
gallium: Define convenience shortcuts for CPU/GPU READ/WRITE flag combinations.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/include/pipe/p_defines.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index cda10a2f06d..dc8a92dccb0 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -204,6 +204,14 @@ enum pipe_texture_target {
/** Pipe driver custom usage flags should be greater or equal to this value */
#define PIPE_BUFFER_USAGE_CUSTOM (1 << 16)
+/* Convenient shortcuts */
+#define PIPE_BUFFER_USAGE_CPU_READ_WRITE \
+ ( PIPE_BUFFER_USAGE_CPU_READ | PIPE_BUFFER_USAGE_CPU_WRITE )
+#define PIPE_BUFFER_USAGE_GPU_READ_WRITE \
+ ( PIPE_BUFFER_USAGE_GPU_READ | PIPE_BUFFER_USAGE_GPU_WRITE )
+#define PIPE_BUFFER_USAGE_WRITE \
+ ( PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_GPU_WRITE )
+
/**
* Flush types: