st/mesa: fix fallout from xfb changes.
[mesa.git] / src / mesa / state_tracker / st_context.h
index 9ed5d1914f362b37146da565e6d54cc68e15c70f..ba51a9c624818c7f1feb39d19b2f9c22928d54fb 100644 (file)
@@ -50,7 +50,7 @@ struct st_perf_monitor_group;
 struct u_upload_mgr;
 
 
-#define ST_NEW_MESA                    (1 << 0) /* Mesa state has changed */
+/* gap  */
 #define ST_NEW_FRAGMENT_PROGRAM        (1 << 1)
 #define ST_NEW_VERTEX_PROGRAM          (1 << 2)
 #define ST_NEW_FRAMEBUFFER             (1 << 3)
@@ -89,6 +89,15 @@ enum st_pipeline {
 };
 
 
+/** For drawing quads for glClear, glDraw/CopyPixels, glBitmap, etc. */
+struct st_util_vertex
+{
+   float x, y, z;
+   float r, g, b, a;
+   float s, t;
+};
+
+
 struct st_context
 {
    struct st_context_iface iface;
@@ -196,6 +205,7 @@ struct st_context
    struct {
       struct pipe_rasterizer_state rasterizer;
       struct pipe_sampler_state sampler;
+      struct pipe_sampler_state atlas_sampler;
       enum pipe_format tex_format;
       void *vs;
       struct bitmap_cache *cache;
@@ -207,6 +217,14 @@ struct st_context
       void *vert_shaders[2];   /**< ureg shaders */
    } drawpix;
 
+   struct {
+      GLsizei width, height;
+      GLenum format, type;
+      const void *user_pointer;  /**< Last user 'pixels' pointer */
+      void *image;               /**< Copy of the glDrawPixels image data */
+      struct pipe_resource *texture;
+   } drawpix_cache;
+
    /** for glClear */
    struct {
       struct pipe_rasterizer_state raster;
@@ -230,8 +248,8 @@ struct st_context
       bool use_gs;
    } pbo_upload;
 
-   /** used for anything using util_draw_vertex_buffer */
-   struct pipe_vertex_element velems_util_draw[3];
+   /** for drawing with st_util_vertex */
+   struct pipe_vertex_element util_velems[3];
 
    void *passthrough_fs;  /**< simple pass-through frag shader */