Merge branch 'gallium-edgeflags'
[mesa.git] / src / gallium / drivers / nv30 / nv30_context.h
index ef8c16bdbb5c23a96ceafbef2681bf9a1735df2e..864ddaeb598eefb937c2bc7e1ddb482ecba99098 100644 (file)
@@ -4,11 +4,16 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_state.h"
+#include "pipe/p_compiler.h"
+
+#include "util/u_memory.h"
+#include "util/u_math.h"
 
 #include "draw/draw_vertex.h"
 
 #include "nouveau/nouveau_winsys.h"
 #include "nouveau/nouveau_gldefs.h"
+#include "nouveau/nouveau_context.h"
 
 #define NOUVEAU_PUSH_CONTEXT(ctx)                                              \
        struct nv30_screen *ctx = nv30->screen
@@ -128,20 +133,17 @@ struct nv30_context {
        struct pipe_blend_color blend_colour;
        struct pipe_viewport_state viewport;
        struct pipe_framebuffer_state framebuffer;
+       struct pipe_buffer *idxbuf;
+       unsigned idxbuf_format;
        struct nv30_sampler_state *tex_sampler[PIPE_MAX_SAMPLERS];
        struct nv30_miptree *tex_miptree[PIPE_MAX_SAMPLERS];
        unsigned nr_samplers;
        unsigned nr_textures;
        unsigned dirty_samplers;
-
-       unsigned vb_enable;
-       struct {
-               struct pipe_buffer *buffer;
-               unsigned delta;
-       } vb[16];
-
-       struct pipe_vertex_buffer  vtxbuf[PIPE_MAX_ATTRIBS];
+       struct pipe_vertex_buffer vtxbuf[PIPE_MAX_ATTRIBS];
+       unsigned vtxbuf_nr;
        struct pipe_vertex_element vtxelt[PIPE_MAX_ATTRIBS];
+       unsigned vtxelt_nr;
 };
 
 static INLINE struct nv30_context *
@@ -181,6 +183,7 @@ 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_state_emit(struct nv30_context *nv30);
+extern void nv30_state_flush_notify(struct nouveau_channel *chan);
 extern struct nv30_state_entry nv30_state_rasterizer;
 extern struct nv30_state_entry nv30_state_scissor;
 extern struct nv30_state_entry nv30_state_stipple;
@@ -192,6 +195,7 @@ extern struct nv30_state_entry nv30_state_zsa;
 extern struct nv30_state_entry nv30_state_viewport;
 extern struct nv30_state_entry nv30_state_framebuffer;
 extern struct nv30_state_entry nv30_state_fragtex;
+extern struct nv30_state_entry nv30_state_vbo;
 
 /* nv30_vbo.c */
 extern boolean nv30_draw_arrays(struct pipe_context *, unsigned mode,
@@ -203,7 +207,7 @@ extern boolean nv30_draw_elements(struct pipe_context *pipe,
                                  unsigned count);
 
 /* nv30_clear.c */
-extern void nv30_clear(struct pipe_context *pipe, struct pipe_surface *ps,
-                      unsigned clearValue);
+extern void nv30_clear(struct pipe_context *pipe, unsigned buffers,
+                      const float *rgba, double depth, unsigned stencil);
 
 #endif