ce696a11a39e44a9fda8425a082f2a0ecdab559d
[profile/ivi/mesa.git] / src / gallium / drivers / nvfx / nv04_surface_2d.h
1 #ifndef __NV04_SURFACE_2D_H__
2 #define __NV04_SURFACE_2D_H__
3
4 struct nv04_surface {
5         struct pipe_surface base;
6         unsigned pitch;
7         struct nv04_surface* backing;
8 };
9
10 struct nv04_surface_2d {
11         struct nouveau_notifier *ntfy;
12         struct nouveau_grobj *surf2d;
13         struct nouveau_grobj *swzsurf;
14         struct nouveau_grobj *m2mf;
15         struct nouveau_grobj *rect;
16         struct nouveau_grobj *blit;
17         struct nouveau_grobj *sifm;
18
19         struct pipe_buffer *(*buf)(struct pipe_surface *);
20
21         void (*copy)(struct nv04_surface_2d *, struct pipe_surface *dst,
22                      int dx, int dy, struct pipe_surface *src, int sx, int sy,
23                      int w, int h);
24         void (*fill)(struct nv04_surface_2d *, struct pipe_surface *dst,
25                      int dx, int dy, int w, int h, unsigned value);
26 };
27
28 struct nv04_surface_2d *
29 nv04_surface_2d_init(struct nouveau_screen *screen);
30
31 void
32 nv04_surface_2d_takedown(struct nv04_surface_2d **);
33
34 struct nv04_surface*
35 nv04_surface_wrap_for_render(struct pipe_screen *pscreen, struct nv04_surface_2d* eng2d, struct nv04_surface* ns);
36
37 #endif