Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
[mesa.git] / src / mesa / pipe / nv50 / nv50_context.h
1 #ifndef __NV50_CONTEXT_H__
2 #define __NV50_CONTEXT_H__
3
4 #include "pipe/p_context.h"
5 #include "pipe/p_defines.h"
6 #include "pipe/p_state.h"
7
8 #include "pipe/draw/draw_vertex.h"
9
10 #include "pipe/nouveau/nouveau_winsys.h"
11 #include "pipe/nouveau/nouveau_gldefs.h"
12
13 #define NOUVEAU_PUSH_CONTEXT(ctx) \
14 struct nv50_context *ctx = nv50
15 #include "pipe/nouveau/nouveau_push.h"
16
17 #include "nv50_state.h"
18
19 #define NOUVEAU_ERR(fmt, args...) \
20 fprintf(stderr, "%s:%d - "fmt, __func__, __LINE__, ##args);
21 #define NOUVEAU_MSG(fmt, args...) \
22 fprintf(stderr, "nouveau: "fmt, ##args);
23
24 struct nv50_context {
25 struct pipe_context pipe;
26 struct nouveau_winsys *nvws;
27
28 struct draw_context *draw;
29
30 int chipset;
31 struct nouveau_grobj *tesla;
32 struct nouveau_notifier *sync;
33 };
34
35
36 extern void nv50_init_miptree_functions(struct nv50_context *nv50);
37 extern void nv50_init_surface_functions(struct nv50_context *nv50);
38 extern void nv50_init_state_functions(struct nv50_context *nv50);
39 extern void nv50_init_query_functions(struct nv50_context *nv50);
40
41 /* nv50_draw.c */
42 extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *nv50);
43
44 /* nv50_vbo.c */
45 extern boolean nv50_draw_arrays(struct pipe_context *, unsigned mode,
46 unsigned start, unsigned count);
47 extern boolean nv50_draw_elements(struct pipe_context *pipe,
48 struct pipe_buffer *indexBuffer,
49 unsigned indexSize,
50 unsigned mode, unsigned start,
51 unsigned count);
52
53 /* nv50_clear.c */
54 extern void nv50_clear(struct pipe_context *pipe, struct pipe_surface *ps,
55 unsigned clearValue);
56
57 #endif