Merge remote branch 'upstream/gallium-0.1' into gallium-0.1
[mesa.git] / src / gallium / drivers / nv30 / nv30_context.h
index 1695ba5a01732e223ec15cf801ede6c113a64e95..0ad1dc6f912a4a7a80c813f6fa5cb360c0543082 100644 (file)
@@ -76,14 +76,28 @@ enum nv30_state_index {
 #define NV30_NEW_ARRAYS                (1 << 11)
 #define NV30_NEW_UCP           (1 << 12)
 
-/* TODO: rename when removing the old state emitter */
-struct nv30_blend_state_new {
+struct nv30_rasterizer_state {
+       struct pipe_rasterizer_state pipe;
+       struct nouveau_stateobj *so;
+};
+
+struct nv30_zsa_state {
+       struct pipe_depth_stencil_alpha_state pipe;
+       struct nouveau_stateobj *so;
+};
+
+struct nv30_blend_state {
        struct pipe_blend_state pipe;
        struct nouveau_stateobj *so;
 };
 
 
 struct nv30_state {
+       unsigned scissor_enabled;
+       unsigned stipple_enabled;
+       unsigned viewport_bypass;
+
+       uint64_t dirty;
        struct nouveau_stateobj *hw[NV30_STATE_MAX];
 };
 
@@ -99,8 +113,6 @@ struct nv30_context {
        /* HW state derived from pipe states */
        struct nv30_state state;
 
-       uint32_t dirty;
-
        struct nv30_sampler_state *tex_sampler[PIPE_MAX_SAMPLERS];
        struct nv30_miptree *tex_miptree[PIPE_MAX_SAMPLERS];
        unsigned dirty_samplers;
@@ -108,8 +120,14 @@ struct nv30_context {
        unsigned vp_samplers;
 
        /* Context state */
-       struct nv30_blend_state_new *blend;
+       unsigned dirty;
+       struct pipe_scissor_state scissor;
+       unsigned stipple[32];
+       struct nv30_rasterizer_state *rasterizer;
+       struct nv30_zsa_state *zsa;
+       struct nv30_blend_state *blend;
        struct pipe_blend_color blend_colour;
+       struct pipe_viewport_state viewport;
        struct pipe_framebuffer_state framebuffer;
 
        uint32_t rt_enable;
@@ -188,8 +206,17 @@ extern void nv30_fragprog_destroy(struct nv30_context *,
 extern void nv30_fragtex_bind(struct nv30_context *);
 
 /* nv30_state.c and friends */
+extern boolean nv30_state_validate(struct nv30_context *nv30);
 extern void nv30_emit_hw_state(struct nv30_context *nv30);
 extern void nv30_state_tex_update(struct nv30_context *nv30);
+extern struct nv30_state_entry nv30_state_rasterizer;
+extern struct nv30_state_entry nv30_state_scissor;
+extern struct nv30_state_entry nv30_state_stipple;
+extern struct nv30_state_entry nv30_state_blend;
+extern struct nv30_state_entry nv30_state_blend_colour;
+extern struct nv30_state_entry nv30_state_zsa;
+extern struct nv30_state_entry nv30_state_viewport;
+extern struct nv30_state_entry nv30_state_framebuffer;
 
 /* nv30_vbo.c */
 extern boolean nv30_draw_arrays(struct pipe_context *, unsigned mode,