1 
2 #ifndef I915_SW_WINSYS_H
3 #define I915_SW_WINSYS_H
4 
5 #include "i915/i915_winsys.h"
6 
7 
8 /*
9  * Winsys
10  */
11 
12 
13 struct i915_sw_winsys
14 {
15    struct i915_winsys base;
16 
17    boolean dump_cmd;
18 
19    size_t max_batch_size;
20 };
21 
22 static INLINE struct i915_sw_winsys *
i915_sw_winsys(struct i915_winsys * iws)23 i915_sw_winsys(struct i915_winsys *iws)
24 {
25    return (struct i915_sw_winsys *)iws;
26 }
27 
28 struct pipe_fence_handle * i915_sw_fence_create(void);
29 
30 void i915_sw_winsys_init_batchbuffer_functions(struct i915_sw_winsys *idws);
31 void i915_sw_winsys_init_buffer_functions(struct i915_sw_winsys *idws);
32 void i915_sw_winsys_init_fence_functions(struct i915_sw_winsys *idws);
33 
34 
35 /*
36  * Buffer
37  */
38 
39 
40 struct i915_sw_buffer {
41    unsigned magic;
42 
43    void *ptr;
44    unsigned map_count;
45    enum i915_winsys_buffer_type type;
46    enum i915_winsys_buffer_tile tiling;
47    unsigned stride;
48 };
49 
50 static INLINE struct i915_sw_buffer *
i915_sw_buffer(struct i915_winsys_buffer * buffer)51 i915_sw_buffer(struct i915_winsys_buffer *buffer)
52 {
53    return (struct i915_sw_buffer *)buffer;
54 }
55 
56 #endif
57