fix softpipe_clear() to handle ps->offset!=0 (such as when rendering to texture and...
[mesa.git] / src / mesa / pipe / softpipe / sp_context.h
index 5c17c47b1280c2d1853c9565392873866ffb4e8a..4f429e8139795071359e17aebbabf5c22db61a0b 100644 (file)
@@ -62,22 +62,26 @@ struct draw_stage;
 #define SP_NEW_VS            0x2000
 #define SP_NEW_CONSTANTS     0x4000
 
+struct sp_vertex_shader_state {
+   const struct pipe_shader_state *state;
+   void  *draw_data;
+};
 
-struct softpipe_context {     
+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:
     */
+   const struct pipe_alpha_test_state *alpha_test;
    const struct pipe_blend_state   *blend;
    const struct pipe_sampler_state *sampler[PIPE_MAX_SAMPLERS];
    const struct pipe_depth_stencil_state   *depth_stencil;
    const struct pipe_rasterizer_state *rasterizer;
    const struct pipe_shader_state *fs;
-   const struct pipe_shader_state *vs;
+   const struct sp_vertex_shader_state *vs;
 
-   struct pipe_alpha_test_state alpha_test;
    struct pipe_blend_color blend_color;
    struct pipe_clear_color_state clear_color;
    struct pipe_clip_state clip;
@@ -111,6 +115,7 @@ struct softpipe_context {
    unsigned nr_frag_attrs;  /**< number of active fragment attribs */
    boolean need_z;  /**< produce quad/fragment Z values? */
    boolean need_w;  /**< produce quad/fragment W values? */
+   int psize_slot;
 
    /** Feedback buffers */
    struct pipe_feedback_buffer feedback_buffer[PIPE_MAX_FEEDBACK_ATTRIBS];
@@ -145,8 +150,12 @@ struct softpipe_context {
 
    /** The primitive drawing context */
    struct draw_context *draw;
+   struct draw_stage *setup;
+   struct draw_stage *vbuf;
 
    struct pipe_surface *cbuf;      /**< current color buffer (one of cbufs) */
+
+   int use_sse : 1;
 };