Merge branch 'mesa_7_6_branch'
[mesa.git] / src / gallium / include / pipe / p_defines.h
index 47c24f30862e223b655f0a5c7ed376eadb32ce26..f8fa1e3f49dc157ece6e71ba6c9fd734510db282 100644 (file)
@@ -191,9 +191,20 @@ enum pipe_texture_target {
  * Transfer object usage flags
  */
 enum pipe_transfer_usage {
-   PIPE_TRANSFER_READ,
-   PIPE_TRANSFER_WRITE,
-   PIPE_TRANSFER_READ_WRITE  /**< Read/modify/write */
+   PIPE_TRANSFER_READ = (1 << 0),
+   PIPE_TRANSFER_WRITE = (1 << 1),
+   /** Read/modify/write */
+   PIPE_TRANSFER_READ_WRITE = PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE,
+   /** 
+    * The transfer should map the texture storage directly. The driver may
+    * return NULL if that isn't possible, and the state tracker needs to cope
+    * with that and use an alternative path without this flag.
+    *
+    * E.g. the state tracker could have a simpler path which maps textures and
+    * does read/modify/write cycles on them directly, and a more complicated
+    * path which uses minimal read and write transfers.
+    */
+   PIPE_TRANSFER_MAP_DIRECTLY = (1 << 2)
 };
 
 
@@ -210,6 +221,7 @@ enum pipe_transfer_usage {
 #define PIPE_BUFFER_USAGE_CONSTANT  (1 << 7)
 #define PIPE_BUFFER_USAGE_DISCARD   (1 << 8)
 #define PIPE_BUFFER_USAGE_DONTBLOCK (1 << 9)
+#define PIPE_BUFFER_USAGE_FLUSH_EXPLICIT (1 << 10) /**< See pipe_screen::buffer_flush_mapped_range */
 /** Pipe driver custom usage flags should be greater or equal to this value */
 #define PIPE_BUFFER_USAGE_CUSTOM    (1 << 16)
 
@@ -273,15 +285,14 @@ enum pipe_transfer_usage {
 
 
 /**
- * Implementation capabilities/limits
- * Passed to pipe->get_param()
- * XXX this will need some fine tuning...
+ * Implementation capabilities/limits which are queried through
+ * pipe_screen::get_param() and pipe_screen::get_paramf().
  */
 #define PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS 1
 #define PIPE_CAP_NPOT_TEXTURES           2
 #define PIPE_CAP_TWO_SIDED_STENCIL       3
 #define PIPE_CAP_GLSL                    4  /* XXX need something better */
-#define PIPE_CAP_S3TC                    5
+#define PIPE_CAP_S3TC                    5  /* XXX: deprecated; cap determined via supported sampler formats */
 #define PIPE_CAP_ANISOTROPIC_FILTER      6
 #define PIPE_CAP_POINT_SPRITE            7
 #define PIPE_CAP_MAX_RENDER_TARGETS      8
@@ -303,6 +314,8 @@ enum pipe_transfer_usage {
 #define PIPE_CAP_TEXTURE_MIRROR_CLAMP    24
 #define PIPE_CAP_TEXTURE_MIRROR_REPEAT   25
 #define PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS 26
+#define PIPE_CAP_TGSI_CONT_SUPPORTED     27
+#define PIPE_CAP_BLEND_EQUATION_SEPARATE 28
 
 
 /**
@@ -313,6 +326,31 @@ enum pipe_transfer_usage {
 #define PIPE_REFERENCED_FOR_READ  (1 << 0)
 #define PIPE_REFERENCED_FOR_WRITE (1 << 1)
 
+
+enum pipe_video_codec
+{
+   PIPE_VIDEO_CODEC_UNKNOWN = 0,
+   PIPE_VIDEO_CODEC_MPEG12,   /**< MPEG1, MPEG2 */
+   PIPE_VIDEO_CODEC_MPEG4,    /**< DIVX, XVID */
+   PIPE_VIDEO_CODEC_VC1,      /**< WMV */
+   PIPE_VIDEO_CODEC_MPEG4_AVC /**< H.264 */
+};
+
+enum pipe_video_profile
+{
+   PIPE_VIDEO_PROFILE_MPEG1,
+   PIPE_VIDEO_PROFILE_MPEG2_SIMPLE,
+   PIPE_VIDEO_PROFILE_MPEG2_MAIN,
+   PIPE_VIDEO_PROFILE_MPEG4_SIMPLE,
+   PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE,
+   PIPE_VIDEO_PROFILE_VC1_SIMPLE,
+   PIPE_VIDEO_PROFILE_VC1_MAIN,
+   PIPE_VIDEO_PROFILE_VC1_ADVANCED,
+   PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,
+   PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN,
+   PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH
+};
+
 #ifdef __cplusplus
 }
 #endif