Merge remote branch 'origin/7.8'
[mesa.git] / src / gallium / drivers / nvfx / nv04_surface_2d.h
1 #ifndef __NV04_SURFACE_2D_H__
2 #define __NV04_SURFACE_2D_H__
3
4 #include "pipe/p_state.h"
5
6 struct nouveau_screen;
7
8 struct nv04_surface {
9 struct pipe_surface base;
10 unsigned pitch;
11 struct nv04_surface* backing;
12 };
13
14 struct nv04_surface_2d {
15 struct nouveau_notifier *ntfy;
16 struct nouveau_grobj *surf2d;
17 struct nouveau_grobj *swzsurf;
18 struct nouveau_grobj *m2mf;
19 struct nouveau_grobj *rect;
20 struct nouveau_grobj *blit;
21 struct nouveau_grobj *sifm;
22
23 struct nouveau_bo *(*buf)(struct pipe_surface *);
24
25 void (*copy)(struct nv04_surface_2d *, struct pipe_surface *dst,
26 int dx, int dy, struct pipe_surface *src, int sx, int sy,
27 int w, int h);
28 void (*fill)(struct nv04_surface_2d *, struct pipe_surface *dst,
29 int dx, int dy, int w, int h, unsigned value);
30 };
31
32 struct nv04_surface_2d *
33 nv04_surface_2d_init(struct nouveau_screen *screen);
34
35 void
36 nv04_surface_2d_takedown(struct nv04_surface_2d **);
37
38 struct nv04_surface*
39 nv04_surface_wrap_for_render(struct pipe_screen *pscreen, struct nv04_surface_2d* eng2d, struct nv04_surface* ns);
40
41 #define NVFX_RESOURCE_FLAG_LINEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 0)
42
43 #endif