blob: c6a7d4a8c51d1f14f7029a96098b0dcadd6d7ae9 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#ifndef INTEL_DRM_WINSYS_H
#define INTEL_DRM_WINSYS_H
#include "i965/brw_winsys.h"
#include "drm.h"
#include "intel_bufmgr.h"
/*
* Winsys
*/
struct i965_libdrm_winsys
{
struct brw_winsys_screen base;
drm_intel_bufmgr *gem;
boolean send_cmd;
int fd; /**< Drm file discriptor */
unsigned id;
};
static INLINE struct i965_libdrm_winsys *
i965_libdrm_winsys(struct brw_winsys_screen *iws)
{
return (struct i965_libdrm_winsys *)iws;
}
struct i965_libdrm_winsys *i965_libdrm_winsys_create(int fd, unsigned pci_id);
void i965_libdrm_winsys_init_buffer_functions(struct i965_libdrm_winsys *idws);
/* Buffer.
*/
struct i965_libdrm_buffer {
struct brw_winsys_buffer base;
drm_intel_bo *bo;
void *ptr;
unsigned map_count;
unsigned data_type; /* valid while mapped */
unsigned tiling;
boolean map_gtt;
boolean flinked;
unsigned flink;
};
static INLINE struct i965_libdrm_buffer *
i965_libdrm_buffer(struct brw_winsys_buffer *buffer)
{
return (struct i965_libdrm_buffer *)buffer;
}
#endif
|