Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
[mesa.git] / src / gallium / drivers / softpipe / sp_context.h
index 8c79cb3ce4fa815f75f370a4c6ec867741cfa3cb..31d7062dcc0e30c90cb767866d54b970cfb2b2ff 100644 (file)
 #include "sp_quad.h"
 
 
+/**
+ * This is a temporary variable for testing draw-stage polygon stipple.
+ * If zero, do stipple in sp_quad_stipple.c
+ */
+#define USE_DRAW_STAGE_PSTIPPLE 1
+
+
 struct softpipe_winsys;
 struct softpipe_vbuf_render;
 struct draw_context;
 struct draw_stage;
 struct softpipe_tile_cache;
-struct sp_fragment_shader_state;
-struct sp_vertex_shader_state;
+struct sp_fragment_shader;
+struct sp_vertex_shader;
 
 
 struct softpipe_context {
@@ -59,8 +66,8 @@ struct softpipe_context {
    const struct pipe_sampler_state *sampler[PIPE_MAX_SAMPLERS];
    const struct pipe_depth_stencil_alpha_state   *depth_stencil;
    const struct pipe_rasterizer_state *rasterizer;
-   const struct sp_fragment_shader_state *fs;
-   const struct sp_vertex_shader_state *vs;
+   const struct sp_fragment_shader *fs;
+   const struct sp_vertex_shader *vs;
 
    struct pipe_blend_color blend_color;
    struct pipe_clip_state clip;
@@ -68,12 +75,17 @@ struct softpipe_context {
    struct pipe_framebuffer_state framebuffer;
    struct pipe_poly_stipple poly_stipple;
    struct pipe_scissor_state scissor;
-   struct softpipe_texture *texture[PIPE_MAX_SAMPLERS];
+   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];
    unsigned dirty;
 
+   unsigned num_samplers;
+   unsigned num_textures;
+
+   uint fb_width, fb_height;
+
    /* Counter for occlusion queries.  Note this supports overlapping
     * queries.
     */