gallium: Define convenience shortcuts for CPU/GPU READ/WRITE flag combinations.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 24 Nov 2008 04:45:19 +0000 (13:45 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 24 Nov 2008 04:45:19 +0000 (13:45 +0900)
src/gallium/include/pipe/p_defines.h

index cda10a2f06d382768f815255ef99356c06582291..dc8a92dccb0ffce9ef1f50f8b4cd90e5edb4c89e 100644 (file)
@@ -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: