nvfx: completely remove this driver (GeForce FX/6/7)
[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 <inttypes.h>
6
7 #include "pipe/p_defines.h"
8
9 #include "nouveau/nouveau_bo.h"
10 #include "nouveau/nouveau_channel.h"
11 #include "nouveau/nouveau_device.h"
12 #include "nouveau/nouveau_grobj.h"
13 #include "nouveau/nouveau_notifier.h"
14 #ifndef NOUVEAU_NVC0
15 #include "nouveau/nv04_pushbuf.h"
16 #endif
17
18 #ifndef NV04_PFIFO_MAX_PACKET_LEN
19 #define NV04_PFIFO_MAX_PACKET_LEN 2047
20 #endif
21
22 #define NOUVEAU_RESOURCE_FLAG_LINEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 0)
23 #define NOUVEAU_RESOURCE_FLAG_DRV_PRIV (PIPE_RESOURCE_FLAG_DRV_PRIV << 1)
24
25 static INLINE uint32_t
26 nouveau_screen_transfer_flags(unsigned pipe)
27 {
28 uint32_t flags = 0;
29
30 if (pipe & PIPE_TRANSFER_READ)
31 flags |= NOUVEAU_BO_RD;
32 if (pipe & PIPE_TRANSFER_WRITE)
33 flags |= NOUVEAU_BO_WR;
34 if (pipe & PIPE_TRANSFER_DISCARD_RANGE)
35 flags |= NOUVEAU_BO_INVAL;
36 if (pipe & PIPE_TRANSFER_UNSYNCHRONIZED)
37 flags |= NOUVEAU_BO_NOSYNC;
38 else if (pipe & PIPE_TRANSFER_DONTBLOCK)
39 flags |= NOUVEAU_BO_NOWAIT;
40
41 return flags;
42 }
43
44 extern struct pipe_screen *
45 nv50_screen_create(struct nouveau_device *);
46
47 extern struct pipe_screen *
48 nvc0_screen_create(struct nouveau_device *);
49
50 #endif