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 "draw/draw_vertex.h"
10 #include "nouveau/nouveau_winsys.h"
11 #include "nouveau/nouveau_gldefs.h"
13 #define NOUVEAU_PUSH_CONTEXT(ctx) \
14 struct nv50_context *ctx = nv50
15 #include "nouveau/nouveau_push.h"
17 #include "nv50_state.h"
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);
25 struct pipe_context pipe
;
26 struct nouveau_winsys
*nvws
;
28 struct draw_context
*draw
;
31 struct nouveau_grobj
*tesla
;
32 struct nouveau_notifier
*sync
;
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
);
42 extern struct draw_stage
*nv50_draw_render_stage(struct nv50_context
*nv50
);
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
,
50 unsigned mode
, unsigned start
,
54 extern void nv50_clear(struct pipe_context
*pipe
, struct pipe_surface
*ps
,