1 #ifndef NOUVEAU_WINSYS_H
2 #define NOUVEAU_WINSYS_H
5 #include "pipe/p_defines.h"
7 #include "nouveau/nouveau_bo.h"
8 #include "nouveau/nouveau_channel.h"
9 #include "nouveau/nouveau_device.h"
10 #include "nouveau/nouveau_grobj.h"
11 #include "nouveau/nouveau_notifier.h"
13 #include "nouveau/nv04_pushbuf.h"
16 #ifndef NV04_PFIFO_MAX_PACKET_LEN
17 #define NV04_PFIFO_MAX_PACKET_LEN 2047
20 #define NOUVEAU_RESOURCE_FLAG_LINEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 0)
22 static INLINE
uint32_t
23 nouveau_screen_transfer_flags(unsigned pipe
)
27 if (pipe
& PIPE_TRANSFER_READ
)
28 flags
|= NOUVEAU_BO_RD
;
29 if (pipe
& PIPE_TRANSFER_WRITE
)
30 flags
|= NOUVEAU_BO_WR
;
31 if (pipe
& PIPE_TRANSFER_DISCARD
)
32 flags
|= NOUVEAU_BO_INVAL
;
33 if (pipe
& PIPE_TRANSFER_UNSYNCHRONIZED
)
34 flags
|= NOUVEAU_BO_NOSYNC
;
35 else if (pipe
& PIPE_TRANSFER_DONTBLOCK
)
36 flags
|= NOUVEAU_BO_NOWAIT
;
41 extern struct pipe_screen
*
42 nvfx_screen_create(struct pipe_winsys
*ws
, struct nouveau_device
*);
44 extern struct pipe_screen
*
45 nv50_screen_create(struct pipe_winsys
*ws
, struct nouveau_device
*);
47 extern struct pipe_screen
*
48 nvc0_screen_create(struct pipe_winsys
*ws
, struct nouveau_device
*);