summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/nouveau_screen.h
blob: cffba11762dcfb3fb952d9da3dd9d556346b523b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef __NOUVEAU_SCREEN_H__
#define __NOUVEAU_SCREEN_H__

struct nouveau_screen {
	struct pipe_screen base;
	struct nouveau_device *device;
};

static inline struct nouveau_screen *
nouveau_screen(struct pipe_screen *pscreen)
{
	return (struct nouveau_screen *)pscreen;
}

static inline struct nouveau_bo *
nouveau_bo(struct pipe_buffer *pb)
{
	return pb ? *(struct nouveau_bo **)(pb + 1) : NULL;
}

int nouveau_screen_init(struct nouveau_screen *, struct nouveau_device *);
void nouveau_screen_fini(struct nouveau_screen *);

#endif