#include "main/colormac.h"
#include "radeon_screen.h"
-#include "common_context.h"
-#include "common_misc.h"
+#include "radeon_common.h"
struct r100_context;
#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)
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;
};
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;
GLuint specoffset;
GLboolean needproj;
-
- struct radeon_dma_region indexed_verts;
};
/* 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
*/
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))