nouveau: switch to libdrm_nouveau-2.0
[mesa.git] / src / gallium / drivers / nouveau / nouveau_context.h
1 #ifndef __NOUVEAU_CONTEXT_H__
2 #define __NOUVEAU_CONTEXT_H__
3
4 #include "pipe/p_context.h"
5
6 struct nouveau_pushbuf;
7
8 struct nouveau_context {
9 struct pipe_context pipe;
10 struct nouveau_screen *screen;
11
12 struct nouveau_pushbuf *pushbuf;
13
14 boolean vbo_dirty;
15 boolean cb_dirty;
16
17 void (*copy_data)(struct nouveau_context *,
18 struct nouveau_bo *dst, unsigned, unsigned,
19 struct nouveau_bo *src, unsigned, unsigned, unsigned);
20 void (*push_data)(struct nouveau_context *,
21 struct nouveau_bo *dst, unsigned, unsigned,
22 unsigned, const void *);
23 /* base, size refer to the whole constant buffer */
24 void (*push_cb)(struct nouveau_context *,
25 struct nouveau_bo *, unsigned domain,
26 unsigned base, unsigned size,
27 unsigned offset, unsigned words, const uint32_t *);
28 };
29
30 static INLINE struct nouveau_context *
31 nouveau_context(struct pipe_context *pipe)
32 {
33 return (struct nouveau_context *)pipe;
34 }
35
36 void
37 nouveau_context_init_vdec(struct nouveau_context *);
38
39 #endif