1 #ifndef __NV50_CONTEXT_H__
2 #define __NV50_CONTEXT_H__
4 #include "pipe/p_context.h"
5 #include "pipe/p_defines.h"
6 #include "pipe/p_state.h"
8 #include "pipe/draw/draw_vertex.h"
10 #include "pipe/nouveau/nouveau_winsys.h"
11 #include "pipe/nouveau/nouveau_gldefs.h"
13 #include "nv50_state.h"
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);
21 struct pipe_context pipe
;
22 struct nouveau_winsys
*nvws
;
24 struct draw_context
*draw
;
27 struct nouveau_grobj
*tesla
;
28 struct nouveau_notifier
*sync
;
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
);
39 extern struct draw_stage
*nv50_draw_render_stage(struct nv50_context
*nv50
);
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
,
47 unsigned mode
, unsigned start
,
51 extern void nv50_clear(struct pipe_context
*pipe
, struct pipe_surface
*ps
,