gallium: standardize on stride instead of pitch in the interface
[mesa.git] / src / gallium / include / pipe / p_state.h
index da783389dae07467d30055ff2c800c19d1399b93..46f62abf3fa0648e4cf2d6d4f5036a35eb59f080 100644 (file)
@@ -27,6 +27,8 @@
 
 
 /**
+ * @file
+ * 
  * Abstract graphics pipe state objects.
  *
  * Basic notes:
@@ -170,7 +172,8 @@ struct pipe_shader_state
 };
 
 
-struct pipe_depth_state {
+struct pipe_depth_state 
+{
    unsigned enabled:1;         /**< depth test enabled? */
    unsigned writemask:1;       /**< allow depth buffer writes? */
    unsigned func:3;            /**< depth test func (PIPE_FUNC_x) */
@@ -178,7 +181,8 @@ struct pipe_depth_state {
 };
 
 
-struct pipe_stencil_state {
+struct pipe_stencil_state
+{
    unsigned enabled:1;  /**< stencil[0]: stencil enabled, stencil[1]: two-side enabled */
    unsigned func:3;     /**< PIPE_FUNC_x */
    unsigned fail_op:3;  /**< PIPE_STENCIL_OP_x */
@@ -190,7 +194,8 @@ struct pipe_stencil_state {
 };
 
 
-struct pipe_alpha_state {
+struct pipe_alpha_state
+{
    unsigned enabled:1;
    unsigned func:3;     /**< PIPE_FUNC_x */
    float ref;           /**< reference value */
@@ -287,9 +292,7 @@ struct pipe_surface
    unsigned refcount;
    unsigned usage;               /**< PIPE_BUFFER_USAGE_*  */
 
-   struct pipe_winsys *winsys;   /**< winsys which owns/created the surface */
-
-   struct pipe_texture *texture; /**< optional texture into which this is a view  */
+   struct pipe_texture *texture; /**< texture into which this is a view  */
    unsigned face;
    unsigned level;
    unsigned zslice;
@@ -315,9 +318,9 @@ struct pipe_texture
    unsigned last_level:8;    /**< Index of last mipmap level present/defined */
    unsigned compressed:1;
 
-   unsigned nr_samples:8;          /**< for multisampled surfaces, nr of samples */
+   unsigned nr_samples:8;    /**< for multisampled surfaces, nr of samples */
 
-   unsigned tex_usage;          /* PIPE_TEXTURE_USAGE_* */
+   unsigned tex_usage;       /* PIPE_TEXTURE_USAGE_* */
 
    /* These are also refcounted:
     */
@@ -334,7 +337,7 @@ struct pipe_texture
  */
 struct pipe_vertex_buffer
 {
-   unsigned pitch;    /**< stride to same attrib in next vertex, in bytes */
+   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 */
    struct pipe_buffer *buffer;  /**< the actual buffer */