Merge commit 'origin/gallium-master-merge'
[mesa.git] / src / gallium / winsys / drm / intel / common / intel_be_context.h
1 /* These need to be diffrent from the intel winsys */
2 #ifndef INTEL_BE_CONTEXT_H
3 #define INTEL_BE_CONTEXT_H
4
5 #include "i915simple/i915_winsys.h"
6
7 struct intel_be_context
8 {
9 /** Interface to i915simple driver */
10 struct i915_winsys base;
11
12 struct intel_be_device *device;
13 struct intel_be_batchbuffer *batch;
14
15 /*
16 * Hardware lock functions.
17 *
18 * Needs to be filled in by the winsys.
19 */
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);
23 };
24
25 /**
26 * Intialize a allocated intel_be_context struct.
27 *
28 * Remember to set the hardware_* functions.
29 */
30 boolean
31 intel_be_init_context(struct intel_be_context *intel,
32 struct intel_be_device *device);
33
34 /**
35 * Destroy a intel_be_context.
36 * Does not free the struct that is up to the winsys.
37 */
38 void
39 intel_be_destroy_context(struct intel_be_context *intel);
40 #endif