gallium/include: update some comments
[mesa.git] / src / gallium / include / pipe / p_defines.h
index 284ebe084c1a9de8c7e7a4aa48a02f5af03d1c30..f252d6df00d1c71b998dab1577cc46b8f64dce76 100644 (file)
@@ -132,6 +132,7 @@ enum pipe_texture_target {
 #define PIPE_TEX_FACE_NEG_Y 3
 #define PIPE_TEX_FACE_POS_Z 4
 #define PIPE_TEX_FACE_NEG_Z 5
+#define PIPE_TEX_FACE_MAX   6
 
 #define PIPE_TEX_WRAP_REPEAT                   0
 #define PIPE_TEX_WRAP_CLAMP                    1
@@ -158,19 +159,14 @@ enum pipe_texture_target {
 #define PIPE_TEX_COMPARE_NONE          0
 #define PIPE_TEX_COMPARE_R_TO_TEXTURE  1
 
-#define PIPE_TEX_FACE_POS_X   0
-#define PIPE_TEX_FACE_NEG_X   1
-#define PIPE_TEX_FACE_POS_Y   2
-#define PIPE_TEX_FACE_NEG_Y   3
-#define PIPE_TEX_FACE_POS_Z   4
-#define PIPE_TEX_FACE_NEG_Z   5
-#define PIPE_TEX_FACE_MAX     6
-
 #define PIPE_TEXTURE_USAGE_RENDER_TARGET   0x1
 #define PIPE_TEXTURE_USAGE_DISPLAY_TARGET  0x2 /* ie a backbuffer */
 #define PIPE_TEXTURE_USAGE_PRIMARY         0x4 /* ie a frontbuffer */
 #define PIPE_TEXTURE_USAGE_DEPTH_STENCIL   0x8
 #define PIPE_TEXTURE_USAGE_SAMPLER         0x10
+#define PIPE_TEXTURE_USAGE_DYNAMIC         0x20
+/** Pipe driver custom usage flags should be greater or equal to this value */
+#define PIPE_TEXTURE_USAGE_CUSTOM          (1 << 16)
 
 #define PIPE_TEXTURE_GEOM_NON_SQUARE       0x1
 #define PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO 0x2
@@ -183,11 +179,22 @@ enum pipe_texture_target {
 
 
 /**
- * Surface status
+ * Clear buffer bits
+ */
+/** All color buffers currently bound */
+#define PIPE_CLEAR_COLOR        (1 << 0)
+/** Depth/stencil combined */
+#define PIPE_CLEAR_DEPTHSTENCIL (1 << 1)
+
+
+/**
+ * Transfer object usage flags
  */
-#define PIPE_SURFACE_STATUS_UNDEFINED  0
-#define PIPE_SURFACE_STATUS_DEFINED    1
-#define PIPE_SURFACE_STATUS_CLEAR      2
+enum pipe_transfer_usage {
+   PIPE_TRANSFER_READ = (1 << 0),
+   PIPE_TRANSFER_WRITE = (1 << 1),
+   PIPE_TRANSFER_READ_WRITE = PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE /**< Read/modify/write */
+};
 
 
 /**
@@ -203,6 +210,7 @@ enum pipe_texture_target {
 #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)
 
@@ -245,6 +253,7 @@ enum pipe_texture_target {
 #define PIPE_PRIM_QUADS           7
 #define PIPE_PRIM_QUAD_STRIP      8
 #define PIPE_PRIM_POLYGON         9
+#define PIPE_PRIM_MAX             10
 
 
 /**
@@ -265,15 +274,14 @@ enum pipe_texture_target {
 
 
 /**
- * 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
@@ -294,8 +302,18 @@ enum pipe_texture_target {
 #define PIPE_CAP_GUARD_BAND_BOTTOM       23  /*< float */
 #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
+
 
+/**
+ * Referenced query flags.
+ */
 
+#define PIPE_UNREFERENCED         0
+#define PIPE_REFERENCED_FOR_READ  (1 << 0)
+#define PIPE_REFERENCED_FOR_WRITE (1 << 1)
 
 #ifdef __cplusplus
 }