2 #ifndef INTEL_BE_CONTEXT_H
3 #define INTEL_BE_CONTEXT_H
5 #include "i915simple/i915_winsys.h"
7 struct intel_be_context
9 /** Interface to i915simple driver */
10 struct i915_winsys base
;
12 struct intel_be_device
*device
;
13 struct intel_be_batchbuffer
*batch
;
16 * Hardware lock functions.
18 * Needs to be filled in by the winsys.
20 void (*hardware_lock
)(struct intel_be_context
*context
);
21 void (*hardware_unlock
)(struct intel_be_context
*context
);
22 boolean (*hardware_locked
)(struct intel_be_context
*context
);
25 static INLINE
struct intel_be_context
*
26 intel_be_context(struct i915_winsys
*sws
)
28 return (struct intel_be_context
*)sws
;
32 * Intialize a allocated intel_be_context struct.
34 * Remember to set the hardware_* functions.
37 intel_be_init_context(struct intel_be_context
*intel
,
38 struct intel_be_device
*device
);
41 * Destroy a intel_be_context.
43 * Does not free the struct that is up to the winsys.
46 intel_be_destroy_context(struct intel_be_context
*intel
);