radeon: fix up span function setting
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_context.h
index 358095a2b9d34c231f27d7991b785dff8702e9c1..2015e96a743f545b5d9acdfe0c17838a76eee011 100644 (file)
@@ -53,8 +53,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/colormac.h"
 #include "radeon_screen.h"
 
-#include "common_context.h"
-#include "common_misc.h"
+#include "radeon_common.h"
 
 
 struct r100_context;
@@ -296,10 +295,7 @@ struct radeon_texture_state {
 #define SHN_SHININESS      1
 #define SHN_STATE_SIZE     2
 
-struct radeon_hw_state {
-       /* Head of the linked list of state atoms. */
-       struct radeon_state_atom atomlist;
-
+struct r100_hw_state {
        /* Hardware state, stored as cmdbuf commands:  
         *   -- Need to doublebuffer for
         *           - eliding noop statechange loops? (except line stipple count)
@@ -324,8 +320,6 @@ struct radeon_hw_state {
        struct radeon_state_atom glt;
        struct radeon_state_atom txr[3];        /* for NPOT */
 
-       int max_state_size;     /* Number of bytes necessary for a full state emit. */
-       GLboolean is_dirty, all_dirty;
 };
 
 
@@ -354,14 +348,6 @@ struct radeon_tcl_info {
 
        struct radeon_bo *indexed_bo;
 
-//     struct radeon_dma_region indexed_verts;
-       struct radeon_dma_region obj;
-       struct radeon_dma_region rgba;
-       struct radeon_dma_region spec;
-       struct radeon_dma_region fog;
-       struct radeon_dma_region tex[RADEON_MAX_TEXTURE_UNITS];
-       struct radeon_dma_region norm;
-
         int elt_cmd_offset; /** Offset into the cmdbuf */
        int elt_cmd_start;
         int elt_used;
@@ -391,8 +377,6 @@ struct r100_swtcl_info {
        GLuint specoffset;
 
        GLboolean needproj;
-
-       struct radeon_dma_region indexed_verts;
 };
 
 
@@ -411,17 +395,13 @@ struct r100_context {
 
        /* Driver and hardware state management
         */
-       struct radeon_hw_state hw;
+       struct r100_hw_state hw;
        struct r100_state state;
 
        /* Vertex buffers
         */
        struct radeon_ioctl ioctl;
        struct radeon_store store;
-       /* A full state emit as of the first state emit in the main store, in case
-        * the context is lost.
-        */
-       struct radeon_store backup_store;
 
        /* TCL stuff
         */
@@ -455,9 +435,23 @@ struct r100_context {
        GLuint c_textureBytes;
        GLuint c_vertexBuffers;
 
-       GLboolean save_on_next_emit;
+  struct {
+      struct gl_fragment_program *bitmap_fp;
+      struct gl_vertex_program *passthrough_vp;
+
+      struct gl_fragment_program *saved_fp;
+      GLboolean saved_fp_enable;
+      struct gl_vertex_program *saved_vp;
+      GLboolean saved_vp_enable;
+
+      GLint saved_vp_x, saved_vp_y;
+      GLsizei saved_vp_width, saved_vp_height;
+      GLenum saved_matrix_mode;
+   } meta;
+
 };
 
+
 #define R100_CONTEXT(ctx)              ((r100ContextPtr)(ctx->DriverCtx))