st/mesa: Use the new _mesa_init_transform_feedback_object() helper.
[mesa.git] / src / mesa / state_tracker / st_context.h
index 8afd7766362d5f8d0d84cedb2b6df48013e73ce7..ab89b49473cc156267f54b04966b31673ce4406a 100644 (file)
@@ -34,7 +34,6 @@
 #include "main/fbobject.h"
 
 struct bitmap_cache;
-struct blit_state;
 struct dd_function_table;
 struct draw_context;
 struct draw_stage;
@@ -51,6 +50,8 @@ struct u_upload_mgr;
 #define ST_NEW_EDGEFLAGS_DATA          (1 << 4)
 #define ST_NEW_GEOMETRY_PROGRAM        (1 << 5)
 #define ST_NEW_VERTEX_ARRAYS           (1 << 6)
+#define ST_NEW_RASTERIZER              (1 << 7)
+#define ST_NEW_UNIFORM_BUFFER          (1 << 8)
 
 
 struct st_state_flags {
@@ -83,6 +84,12 @@ struct st_context
    GLboolean clamp_frag_color_in_shader;
    GLboolean clamp_vert_color_in_shader;
    boolean has_stencil_export; /**< can do shader stencil export? */
+   boolean has_time_elapsed;
+   boolean has_shader_model3;
+   boolean prefer_blit_based_texture_transfer;
+
+   boolean needs_texcoord_semantic;
+   boolean apply_texture_swizzle_to_border_color;
 
    /* On old libGL's for linux we need to invalidate the drawables
     * on glViewpport calls, this is set via a option.
@@ -98,25 +105,20 @@ struct st_context
       struct pipe_blend_state               blend;
       struct pipe_depth_stencil_alpha_state depth_stencil;
       struct pipe_rasterizer_state          rasterizer;
-      struct pipe_sampler_state    fragment_samplers[PIPE_MAX_SAMPLERS];
-      struct pipe_sampler_state    vertex_samplers[PIPE_MAX_SAMPLERS];
+      struct pipe_sampler_state samplers[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
+      GLuint num_samplers[PIPE_SHADER_TYPES];
+      struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
+      GLuint num_sampler_views[PIPE_SHADER_TYPES];
       struct pipe_clip_state clip;
       struct {
          void *ptr;
          unsigned size;
       } constants[PIPE_SHADER_TYPES];
       struct pipe_framebuffer_state framebuffer;
-      struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
-      struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_SAMPLERS];
       struct pipe_scissor_state scissor;
       struct pipe_viewport_state viewport;
       unsigned sample_mask;
 
-      GLuint num_fragment_samplers;
-      GLuint num_vertex_samplers;
-      GLuint num_fragment_textures;
-      GLuint num_vertex_textures;
-
       GLuint poly_stipple[32];  /**< In OpenGL's bottom-to-top order */
 
       GLuint fb_orientation;
@@ -130,7 +132,7 @@ struct st_context
    GLboolean missing_textures;
    GLboolean vertdata_edgeflags;
 
-   /** Mapping from VERT_RESULT_x to post-transformed vertex slot */
+   /** Mapping from VARYING_SLOT_x to post-transformed vertex slot */
    const GLuint *vertex_result_to_slot;
 
    struct st_vertex_program *vp;    /**< Currently bound vertex program */
@@ -176,7 +178,6 @@ struct st_context
       struct pipe_viewport_state viewport;
       void *vs;
       void *fs;
-      boolean enable_ds_separate;
    } clear;
 
    /** used for anything using util_draw_vertex_buffer */
@@ -186,19 +187,18 @@ struct st_context
 
    enum pipe_texture_target internal_target;
    struct gen_mipmap_state *gen_mipmap;
-   struct blit_state *blit;
 
    struct cso_context *cso_context;
 
-   int force_msaa;
    void *winsys_drawable_handle;
 
-   /* Active render condition. */
-   struct pipe_query *render_condition;
-   unsigned condition_mode;
+   /* The number of vertex buffers from the last call of validate_arrays. */
+   unsigned last_num_vbuffers;
 
    int32_t draw_stamp;
    int32_t read_stamp;
+
+   struct st_config_options options;
 };
 
 
@@ -265,13 +265,11 @@ st_fb_orientation(const struct gl_framebuffer *fb)
 #define ST_CALLOC_STRUCT(T)   (struct T *) calloc(1, sizeof(struct T))
 
 
-extern int
-st_get_msaa(void);
-
 extern struct st_context *
 st_create_context(gl_api api, struct pipe_context *pipe,
                   const struct gl_config *visual,
-                  struct st_context *share);
+                  struct st_context *share,
+                  const struct st_config_options *options);
 
 extern void
 st_destroy_context(struct st_context *st);