gallium: Propagate tex_usage flags down to winsys.
[mesa.git] / src / gallium / drivers / softpipe / sp_context.h
index 31d7062dcc0e30c90cb767866d54b970cfb2b2ff..62eabfb30e80a184d1226db8e1d12059dc04d6d0 100644 (file)
@@ -57,8 +57,6 @@ struct sp_vertex_shader;
 
 struct softpipe_context {
    struct pipe_context pipe;  /**< base class */
-   struct softpipe_winsys *winsys;     /**< window system interface */
-
 
    /* The most recent drawing state as set by the driver:
     */
@@ -77,14 +75,16 @@ struct softpipe_context {
    struct pipe_scissor_state scissor;
    struct pipe_texture *texture[PIPE_MAX_SAMPLERS];
    struct pipe_viewport_state viewport;
-   struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];
-   struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
+   struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+   struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
    unsigned dirty;
 
    unsigned num_samplers;
    unsigned num_textures;
+   unsigned num_vertex_elements;
+   unsigned num_vertex_buffers;
 
-   uint fb_width, fb_height;
+   boolean no_rast;
 
    /* Counter for occlusion queries.  Note this supports overlapping
     * queries.
@@ -94,7 +94,7 @@ struct softpipe_context {
    /*
     * Mapped vertex buffers
     */
-   ubyte *mapped_vbuffer[PIPE_ATTRIB_MAX];
+   ubyte *mapped_vbuffer[PIPE_MAX_ATTRIBS];
    
    /** Mapped constant buffers */
    void *mapped_constants[PIPE_SHADER_TYPES];
@@ -105,6 +105,8 @@ struct softpipe_context {
 
    int psize_slot;
 
+   unsigned reduced_api_prim;  /**< PIPE_PRIM_POINTS, _LINES or _TRIANGLES */
+
 #if 0
    /* Stipple derived state:
     */
@@ -126,7 +128,6 @@ struct softpipe_context {
       struct quad_stage *depth_test;
       struct quad_stage *occlusion;
       struct quad_stage *coverage;
-      struct quad_stage *bufloop;
       struct quad_stage *blend;
       struct quad_stage *colormask;
       struct quad_stage *output;
@@ -140,8 +141,6 @@ struct softpipe_context {
    struct draw_stage *vbuf;
    struct softpipe_vbuf_render *vbuf_render;
 
-   uint current_cbuf;      /**< current color buffer being written to */
-
    struct softpipe_tile_cache *cbuf_cache[PIPE_MAX_COLOR_BUFS];
    struct softpipe_tile_cache *zsbuf_cache;