summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/nv50/nv50_context.h
blob: f7fa48553d0d4eb5139e1a1537971e26996e1372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef __NV50_CONTEXT_H__
#define __NV50_CONTEXT_H__

#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"

#include "pipe/draw/draw_vertex.h"

#include "pipe/nouveau/nouveau_winsys.h"
#include "pipe/nouveau/nouveau_gldefs.h"

#include "nv50_state.h"

#define NOUVEAU_ERR(fmt, args...) \
	fprintf(stderr, "%s:%d -  "fmt, __func__, __LINE__, ##args);
#define NOUVEAU_MSG(fmt, args...) \
	fprintf(stderr, "nouveau: "fmt, ##args);

struct nv50_context {
	struct pipe_context pipe;
	struct nouveau_winsys *nvws;

	struct draw_context *draw;

	int chipset;
	struct nouveau_grobj *tesla;
	struct nouveau_notifier *sync;
	uint32_t *pushbuf;
};


extern void nv50_init_region_functions(struct nv50_context *nv50);
extern void nv50_init_surface_functions(struct nv50_context *nv50);
extern void nv50_init_state_functions(struct nv50_context *nv50);

/* nv50_draw.c */
extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *nv50);

/* nv50_miptree.c */
extern boolean nv50_miptree_layout(struct pipe_context *,
				   struct pipe_mipmap_tree *);
/* nv50_vbo.c */
extern boolean nv50_draw_arrays(struct pipe_context *, unsigned mode,
				unsigned start, unsigned count);
extern boolean nv50_draw_elements(struct pipe_context *pipe,
				  struct pipe_buffer_handle *indexBuffer,
				  unsigned indexSize,
				  unsigned mode, unsigned start,
				  unsigned count);

/* nv50_clear.c */
extern void nv50_clear(struct pipe_context *pipe, struct pipe_surface *ps,
		       unsigned clearValue);

/* nv50_query.c */
extern void nv50_query_begin(struct pipe_context *, struct pipe_query_object *);
extern void nv50_query_end(struct pipe_context *, struct pipe_query_object *);
extern void nv50_query_wait(struct pipe_context *, struct pipe_query_object *);


#endif