a8abb01a9ed82ace71acecb8ff4663094284ca85
2 #ifndef INTEL_BE_FENCE_H
3 #define INTEL_BE_FENCE_H
5 #include "pipe/p_defines.h"
8 #include "intel_bufmgr.h"
11 * Because gem does not have fence's we have to create our own fences.
13 * They work by keeping the batchbuffer around and checking if that has
14 * been idled. If bo is NULL fence has expired.
18 struct pipe_reference reference
;
23 intel_be_fence_reference(struct intel_be_fence
**ptr
, struct intel_be_fence
*f
)
25 struct intel_be_fence
*old_fence
= *ptr
;
27 if (pipe_reference((struct pipe_reference
**)ptr
, &f
->reference
)) {
29 drm_intel_bo_unreference(old_fence
->bo
);