nvfx: support rendering to more formats
[mesa.git] / src / gallium / drivers / nouveau / nouveau_winsys.h
1 #ifndef NOUVEAU_WINSYS_H
2 #define NOUVEAU_WINSYS_H
3
4 #include <stdint.h>
5 #include "pipe/p_defines.h"
6
7 #include "nouveau/nouveau_bo.h"
8 #include "nouveau/nouveau_channel.h"
9 #include "nouveau/nouveau_class.h"
10 #include "nouveau/nouveau_device.h"
11 #include "nouveau/nouveau_grobj.h"
12 #include "nouveau/nouveau_notifier.h"
13 #include "nouveau/nouveau_resource.h"
14 #include "nouveau/nouveau_pushbuf.h"
15
16 static INLINE uint32_t
17 nouveau_screen_transfer_flags(unsigned pipe)
18 {
19 uint32_t flags = 0;
20
21 if (pipe & PIPE_TRANSFER_READ)
22 flags |= NOUVEAU_BO_RD;
23 if (pipe & PIPE_TRANSFER_WRITE)
24 flags |= NOUVEAU_BO_WR;
25 if (pipe & PIPE_TRANSFER_DISCARD)
26 flags |= NOUVEAU_BO_INVAL;
27 if (pipe & PIPE_TRANSFER_UNSYNCHRONIZED)
28 flags |= NOUVEAU_BO_NOSYNC;
29 else if (pipe & PIPE_TRANSFER_DONTBLOCK)
30 flags |= NOUVEAU_BO_NOWAIT;
31
32 return flags;
33 }
34
35 extern struct pipe_screen *
36 nvfx_screen_create(struct pipe_winsys *ws, struct nouveau_device *);
37
38 extern struct pipe_screen *
39 nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *);
40
41 #endif