1 | /*
|
---|
2 | * Copyright © 2010 NVIDIA Corporation
|
---|
3 | *
|
---|
4 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
5 | * copy of this software and associated documentation files (the "Software"),
|
---|
6 | * to deal in the Software without restriction, including without limitation
|
---|
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
8 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
9 | * Software is furnished to do so, subject to the following conditions:
|
---|
10 | *
|
---|
11 | * The above copyright notice and this permission notice (including the next
|
---|
12 | * paragraph) shall be included in all copies or substantial portions of the
|
---|
13 | * Software.
|
---|
14 | *
|
---|
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
---|
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
---|
20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
---|
21 | * DEALINGS IN THE SOFTWARE.
|
---|
22 | */
|
---|
23 |
|
---|
24 | #ifdef HAVE_DIX_CONFIG_H
|
---|
25 | #include <dix-config.h>
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | #ifndef _MISYNC_H_
|
---|
29 | #define _MISYNC_H_
|
---|
30 |
|
---|
31 | typedef struct _SyncFence SyncFence;
|
---|
32 | typedef struct _SyncTrigger SyncTrigger;
|
---|
33 |
|
---|
34 | typedef void (*SyncScreenCreateFenceFunc) (ScreenPtr pScreen,
|
---|
35 | SyncFence* pFence,
|
---|
36 | Bool initially_triggered);
|
---|
37 | typedef void (*SyncScreenDestroyFenceFunc) (ScreenPtr pScreen,
|
---|
38 | SyncFence* pFence);
|
---|
39 |
|
---|
40 | typedef struct _syncScreenFuncs {
|
---|
41 | SyncScreenCreateFenceFunc CreateFence;
|
---|
42 | SyncScreenDestroyFenceFunc DestroyFence;
|
---|
43 | } SyncScreenFuncsRec, *SyncScreenFuncsPtr;
|
---|
44 |
|
---|
45 | extern _X_EXPORT void
|
---|
46 | miSyncScreenCreateFence(ScreenPtr pScreen, SyncFence* pFence,
|
---|
47 | Bool initially_triggered);
|
---|
48 | extern _X_EXPORT void
|
---|
49 | miSyncScreenDestroyFence(ScreenPtr pScreen, SyncFence* pFence);
|
---|
50 |
|
---|
51 | typedef void (*SyncFenceSetTriggeredFunc) (SyncFence* pFence);
|
---|
52 | typedef void (*SyncFenceResetFunc) (SyncFence* pFence);
|
---|
53 | typedef Bool (*SyncFenceCheckTriggeredFunc) (SyncFence* pFence);
|
---|
54 | typedef void (*SyncFenceAddTriggerFunc) (SyncTrigger* pTrigger);
|
---|
55 | typedef void (*SyncFenceDeleteTriggerFunc) (SyncTrigger* pTrigger);
|
---|
56 |
|
---|
57 | typedef struct _syncFenceFuncs {
|
---|
58 | SyncFenceSetTriggeredFunc SetTriggered;
|
---|
59 | SyncFenceResetFunc Reset;
|
---|
60 | SyncFenceCheckTriggeredFunc CheckTriggered;
|
---|
61 | SyncFenceAddTriggerFunc AddTrigger;
|
---|
62 | SyncFenceDeleteTriggerFunc DeleteTrigger;
|
---|
63 | } SyncFenceFuncsRec, *SyncFenceFuncsPtr;
|
---|
64 |
|
---|
65 | extern _X_EXPORT void
|
---|
66 | miSyncInitFence(ScreenPtr pScreen, SyncFence* pFence, Bool initially_triggered);
|
---|
67 | extern _X_EXPORT void
|
---|
68 | miSyncDestroyFence(SyncFence* pFence);
|
---|
69 | extern _X_EXPORT void
|
---|
70 | miSyncTriggerFence(SyncFence* pFence);
|
---|
71 |
|
---|
72 | extern _X_EXPORT SyncScreenFuncsPtr
|
---|
73 | miSyncGetScreenFuncs(ScreenPtr pScreen);
|
---|
74 | extern _X_EXPORT Bool
|
---|
75 | miSyncSetup(ScreenPtr pScreen);
|
---|
76 |
|
---|
77 | #endif /* _MISYNC_H_ */
|
---|