#define ST_NEW_MESA 0x1 /* Mesa state has changed */
#define ST_NEW_FRAGMENT_PROGRAM 0x2
#define ST_NEW_VERTEX_PROGRAM 0x4
+#define ST_NEW_FRAMEBUFFER 0x8
struct st_state_flags {
} state;
struct {
- struct st_tracked_state tracked_state[2];
+ struct st_tracked_state tracked_state[PIPE_SHADER_TYPES];
} constants;
/* XXX unused: */
struct st_state_flags dirty;
- GLfloat polygon_offset_scale; /* ?? */
+ GLboolean missing_textures;
- GLfloat bitmap_texcoord_bias;
+ GLfloat polygon_offset_scale; /* ?? */
/** Mapping from VERT_RESULT_x to post-transformed vertex slot */
const GLuint *vertex_result_to_slot;
struct st_vertex_program *vp; /**< Currently bound vertex program */
struct st_fragment_program *fp; /**< Currently bound fragment program */
+ struct gl_texture_object *default_texture;
+
struct {
struct gl_program_cache *cache;
struct st_fragment_program *program; /**< cur pixel transfer prog */
GLuint user_prog_sn; /**< user fragment program serial no. */
struct st_fragment_program *combined_prog;
GLuint combined_prog_sn;
+ struct pipe_texture *pixelmap_texture;
+ boolean pixelmap_enabled; /**< use the pixelmap texture? */
} pixel_xfer;
/** for glBitmap */
struct {
- struct st_fragment_program *program; /**< bitmap tex/kil program */
- GLuint user_prog_sn; /**< user fragment program serial no. */
- struct st_fragment_program *combined_prog;
struct pipe_rasterizer_state rasterizer;
struct pipe_sampler_state sampler;
struct pipe_shader_state vert_shader;
+ enum pipe_format tex_format;
void *vs;
float vertices[4][3][4]; /**< vertex pos + color + texcoord */
struct pipe_buffer *vbuf;
+ unsigned vbuf_slot; /* next free slot in vbuf */
struct bitmap_cache *cache;
} bitmap;
+ /** for glDraw/CopyPixels */
+ struct {
+ struct st_fragment_program *z_shader;
+ struct st_vertex_program *vert_shaders[2];
+ } drawpix;
+
/** for glClear */
struct {
struct pipe_shader_state vert_shader;
void *fs;
float vertices[4][2][4]; /**< vertex pos + color */
struct pipe_buffer *vbuf;
+ unsigned vbuf_slot;
} clear;
+ void *passthrough_fs; /**< simple pass-through frag shader */
+
struct gen_mipmap_state *gen_mipmap;
struct blit_state *blit;
struct cso_context *cso_context;
+
+ int force_msaa;
};
}
+/** clear-alloc a struct-sized object, with casting */
+#define ST_CALLOC_STRUCT(T) (struct T *) _mesa_calloc(sizeof(struct T))
+
+
+extern int
+st_get_msaa(void);
+
+
#endif