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