tgsi: add properties for fragment coord conventions (v3)
[mesa.git] / src / gallium / include / pipe / p_state.h
index 4d38bbcc32695755f7a884469e027440761d4bc5..03cd74efed3a8d98d3a5f4b60fde6ae79eede2e1 100644 (file)
@@ -58,7 +58,7 @@ extern "C" {
 #define PIPE_MAX_ATTRIBS          32
 #define PIPE_MAX_CLIP_PLANES       6
 #define PIPE_MAX_COLOR_BUFS        8
-#define PIPE_MAX_CONSTANT         32
+#define PIPE_MAX_CONSTANT_BUFFERS 32
 #define PIPE_MAX_SAMPLERS         16
 #define PIPE_MAX_VERTEX_SAMPLERS  16
 #define PIPE_MAX_SHADER_INPUTS    16
@@ -66,10 +66,6 @@ extern "C" {
 #define PIPE_MAX_TEXTURE_LEVELS   16
 
 
-/* fwd decls */
-struct pipe_surface;
-
-
 /**
  * The driver will certainly subclass this to include actual memory
  * management information.
@@ -178,15 +174,6 @@ struct pipe_clip_state
 };
 
 
-/**
- * Constants for vertex/fragment shaders
- */
-struct pipe_constant_buffer
-{
-   struct pipe_buffer *buffer;
-};
-
-
 struct pipe_shader_state
 {
    const struct tgsi_token *tokens;
@@ -230,7 +217,7 @@ struct pipe_depth_stencil_alpha_state
 };
 
 
-struct pipe_blend_state
+struct pipe_rt_blend_state
 {
    unsigned blend_enable:1;
 
@@ -242,11 +229,16 @@ struct pipe_blend_state
    unsigned alpha_src_factor:5;  /**< PIPE_BLENDFACTOR_x */
    unsigned alpha_dst_factor:5;  /**< PIPE_BLENDFACTOR_x */
 
+   unsigned colormask:4;         /**< bitmask of PIPE_MASK_R/G/B/A */
+};
+
+struct pipe_blend_state
+{
+   unsigned independent_blend_enable:1;
    unsigned logicop_enable:1;
    unsigned logicop_func:4;      /**< PIPE_LOGICOP_x */
-
-   unsigned colormask:4;         /**< bitmask of PIPE_MASK_R/G/B/A */
    unsigned dither:1;
+   struct pipe_rt_blend_state rt[PIPE_MAX_COLOR_BUFS];
 };
 
 
@@ -282,7 +274,7 @@ struct pipe_sampler_state
    unsigned compare_mode:1;      /**< PIPE_TEX_COMPARE_x */
    unsigned compare_func:3;      /**< PIPE_FUNC_x */
    unsigned normalized_coords:1; /**< Are coords normalized to [0,1]? */
-   unsigned prefilter:4;         /**< Wierd sampling state exposed by some api's */
+   unsigned prefilter:4;         /**< Cylindrical texcoord wrap, per coord, exposed by some api's */
    float lod_bias;               /**< LOD/lambda bias */
    float min_lod, max_lod;       /**< LOD clamp range, after bias */
    float border_color[4];
@@ -364,7 +356,6 @@ struct pipe_vertex_buffer
    unsigned stride;    /**< stride to same attrib in next vertex, in bytes */
    unsigned max_index;   /**< number of vertices in this buffer */
    unsigned buffer_offset;  /**< offset to start of data in buffer, in bytes */
-   unsigned instance_divisor;    /**< instance data rate divisor, 0 means per-vertex data */
    struct pipe_buffer *buffer;  /**< the actual buffer */
 };
 
@@ -377,6 +368,11 @@ struct pipe_vertex_element
    /** Offset of this attribute, in bytes, from the start of the vertex */
    unsigned src_offset;
 
+   /** Instance data rate divisor. 0 means this is per-vertex data,
+    *  n means per-instance data used for n consecutive instances (n > 0).
+    */
+   unsigned instance_divisor;
+
    /** Which vertex_buffer (as given to pipe->set_vertex_buffer()) does
     * this attribute live in?
     */