Merge remote branch 'origin/master' into gallium_draw_llvm
[mesa.git] / src / gallium / drivers / llvmpipe / lp_context.h
index 1ede6a6a72f9bc69bce5c690194dc3145962601d..71f991049e5acfeec60a4a2c1ffa296e7db8f475 100644 (file)
@@ -45,7 +45,8 @@ struct draw_stage;
 struct lp_fragment_shader;
 struct lp_vertex_shader;
 struct lp_blend_state;
-struct setup_context;
+struct lp_setup_context;
+struct lp_velems_state;
 
 struct llvmpipe_context {
    struct pipe_context pipe;  /**< base class */
@@ -58,25 +59,25 @@ struct llvmpipe_context {
    const struct pipe_rasterizer_state *rasterizer;
    struct lp_fragment_shader *fs;
    const struct lp_vertex_shader *vs;
+   const struct lp_velems_state *velems;
 
    /** Other rendering state */
    struct pipe_blend_color blend_color;
+   struct pipe_stencil_ref stencil_ref;
    struct pipe_clip_state clip;
-   struct pipe_constant_buffer constants[PIPE_SHADER_TYPES];
+   struct pipe_buffer *constants[PIPE_SHADER_TYPES];
    struct pipe_framebuffer_state framebuffer;
    struct pipe_poly_stipple poly_stipple;
    struct pipe_scissor_state scissor;
-   struct pipe_texture *texture[PIPE_MAX_SAMPLERS];
-   struct pipe_texture *vertex_textures[PIPE_MAX_VERTEX_SAMPLERS];
+   struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
+   struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
    struct pipe_viewport_state viewport;
    struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
-   struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
 
    unsigned num_samplers;
-   unsigned num_textures;
+   unsigned num_fragment_sampler_views;
    unsigned num_vertex_samplers;
-   unsigned num_vertex_textures;
-   unsigned num_vertex_elements;
+   unsigned num_vertex_sampler_views;
    unsigned num_vertex_buffers;
 
    unsigned dirty; /**< Mask of LP_NEW_x flags */
@@ -96,11 +97,8 @@ struct llvmpipe_context {
    /** Which vertex shader output slot contains point size */
    int psize_slot;
 
-   /** Derived from scissor and surface bounds: */
-   struct pipe_scissor_state cliprect;
-
    /** The tiling engine */
-   struct setup_context *setup;
+   struct lp_setup_context *setup;
 
    /** The primitive drawing context */
    struct draw_context *draw;
@@ -111,6 +109,10 @@ struct llvmpipe_context {
 };
 
 
+struct pipe_context *
+llvmpipe_create_context( struct pipe_screen *screen, void *priv );
+
+
 static INLINE struct llvmpipe_context *
 llvmpipe_context( struct pipe_context *pipe )
 {