nouveau,nvc0: fix/improve handling of multiple constant buffers
[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_context {
7 struct pipe_context pipe;
8 struct nouveau_screen *screen;
9
10 boolean vbo_dirty;
11 boolean cb_dirty;
12
13 void (*copy_data)(struct nouveau_context *,
14 struct nouveau_bo *dst, unsigned, unsigned,
15 struct nouveau_bo *src, unsigned, unsigned, unsigned);
16 void (*push_data)(struct nouveau_context *,
17 struct nouveau_bo *dst, unsigned, unsigned,
18 unsigned, const void *);
19 /* base, size refer to the whole constant buffer */
20 void (*push_cb)(struct nouveau_context *,
21 struct nouveau_bo *, unsigned domain,
22 unsigned base, unsigned size,
23 unsigned offset, unsigned words, const uint32_t *);
24 };
25
26 static INLINE struct nouveau_context *
27 nouveau_context(struct pipe_context *pipe)
28 {
29 return (struct nouveau_context *)pipe;
30 }
31
32 void
33 nouveau_context_init_vdec(struct nouveau_context *);
34
35 #endif