Merge branch 'upstream-gallium-0.1' into darktama-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 #include "nv50_state.h"
14
15 #define NOUVEAU_ERR(fmt, args...) \
16 fprintf(stderr, "%s:%d - "fmt, __func__, __LINE__, ##args);
17 #define NOUVEAU_MSG(fmt, args...) \
18 fprintf(stderr, "nouveau: "fmt, ##args);
19
20 struct nv50_context {
21 struct pipe_context pipe;
22 struct nouveau_winsys *nvws;
23
24 struct draw_context *draw;
25
26 int chipset;
27 struct nouveau_grobj *tesla;
28 struct nouveau_notifier *sync;
29 uint32_t *pushbuf;
30 };
31
32
33 extern void nv50_init_miptree_functions(struct nv50_context *nv50);
34 extern void nv50_init_surface_functions(struct nv50_context *nv50);
35 extern void nv50_init_state_functions(struct nv50_context *nv50);
36 extern void nv50_init_query_functions(struct nv50_context *nv50);
37
38 /* nv50_draw.c */
39 extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *nv50);
40
41 /* nv50_vbo.c */
42 extern boolean nv50_draw_arrays(struct pipe_context *, unsigned mode,
43 unsigned start, unsigned count);
44 extern boolean nv50_draw_elements(struct pipe_context *pipe,
45 struct pipe_buffer_handle *indexBuffer,
46 unsigned indexSize,
47 unsigned mode, unsigned start,
48 unsigned count);
49
50 /* nv50_clear.c */
51 extern void nv50_clear(struct pipe_context *pipe, struct pipe_surface *ps,
52 unsigned clearValue);
53
54 #endif