• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    NVX_progress_fence
4
5Name Strings
6
7    GL_NVX_progress_fence
8
9Contributors
10
11    Ingo Esser, NVIDIA
12    Joshua Schnarr, NVIDIA
13    Ralf Biermann, NVIDIA
14
15Contact
16
17    Ralf Biermann, NVIDIA corporation (rbiermann'at' nvidia.com)
18
19Status
20
21    Complete.
22
23Version
24
25    Last Modified Date: August 15, 2018
26    Author Revision: 2
27
28Number
29
30    OpenGL Extension #541
31
32Dependencies
33
34    This extension is written against the OpenGL 4.5 and OpenGL ES 3.2 specifications.
35
36    This extension requires EXT_external_objects.
37
38    This extension requires EXT_external_objects_win32
39
40    This extension interacts with NV_gpu_multicast.
41
42Overview
43
44    This extension uses the concept of GL semaphores as defined in
45    GL_EXT_semaphore to better coordinate operations between multiple
46    GPU command streams. A semaphore type called "progress fence" is
47    derived from the GL semaphore. The progress fence semaphore is
48    created by CreateProgressFenceNVX() returning the name of a newly
49    created semaphore object. Like other semaphores, these are signaled
50    by the GL server. Each signal operation is queued in the GPU command
51    stream with an associated fence value that is written to the semaphore
52    at the completion of a signal operation.
53
54    A GL server wait can be added to the command stream using WaitSemaphoreui64NVX.
55    This blocks the GPU until the progress fence semaphore reaches or exceeds the
56    specified fence value.
57
58    A GL client wait can be initiated using ClientWaitSemaphoreui64NVX.
59    This blocks the CPU until the specified fence value is reached.
60
61New Procedures and Functions
62
63    uint CreateProgressFenceNVX();
64
65    void SignalSemaphoreui64NVX(uint signalGpu,
66                                sizei fenceObjectCount,
67                                const uint *semaphoreArray,
68                                const uint64 *fenceValueArray);
69
70    void WaitSemaphoreui64NVX(uint waitGpu,
71                              sizei fenceObjectCount,
72                              const uint *semaphoreArray,
73                              const uint64 *fenceValueArray);
74
75    void ClientWaitSemaphoreui64NVX(sizei fenceObjectCount,
76                                    const uint *semaphoreArray,
77                                    const uint64 *fenceValueArray);
78
79New Types
80
81    None
82
83New Tokens
84
85    None
86
87Additions to Chapter 4 of the OpenGL 4.5 Specification (Event Model)
88
89  Addition to Section 4.2, "Semaphore Objects"
90
91
92    A command
93
94      uint CreateProgressFenceNVX();
95
96    creates a named progress fence semaphore object.
97
98    A set of progress fence objects can be deleted by passing the names in the
99    array <semaphores> to the command
100
101      void DeleteSemaphoresEXT(sizei n, const uint *semaphores);
102
103    Progress fence operations can be performed on named semaphore objects. The
104    command
105
106      void SignalSemaphoreui64NVX(uint signalGpu,
107                                  sizei fenceObjectCount,
108                                  const uint *semaphoreArray,
109                                  const uint64 *fenceValueArray);
110
111    SignalSemaphoreui64NVX inserts a signal operation for each of the <fenceObjectCount>
112    semaphores in <semaphoreArray>. Each signal writes the corresponding fence value in
113    <fenceValueArray>.
114
115    If the GL context uses NV_gpu_multicast to control multiple GPUs, the
116    <signalGpu> parameter is required to specify the GPU that signals the
117    fence value to the fence object. Otherwise <signalGpu> must be 0.
118
119    If a value in <semaphoreArray> is not the name of a semaphore object,
120    an INVALID_VALUE error is generated.
121
122    If NV_gpu_multicast is supported, an INVALID_VALUE error is generated if <signalGpu>
123    is greater than or equal to MULTICAST_GPUS_NV. Otherwise, an INVALID_VALUE error is
124    generated if <signalGpu> != 0.
125
126    The command
127
128      void WaitSemaphoreui64NVX(uint waitGpu,
129                                sizei fenceObjectCount,
130                                const uint *semaphoreArray,
131                                const uint64 *fenceValueArray);
132
133    inserts a wait command into the GL server command stream of a specified GPU <waitGpu>
134    for each of the <fenceObjectCount> progress fence objects in <semaphoreArray> which
135    blocks <waitGpu> until all fence objects reach or exceed the associated fence value
136    in <fenceValueArray>.
137
138    If a value in <semaphoreArray> is not the name of a semaphore object,
139    an INVALID_VALUE error is generated.
140
141    The command
142
143      void ClientWaitSemaphoreui64NVX(sizei fenceObjectCount,
144                                      const uint *semaphoreArray,
145                                      const uint64 *fenceValueArray);
146
147    blocks the CPU until each of the <fenceObjectCount> fence objects in a
148    specified array <semaphoreArray> reaches the corresponding fence value
149    in <fenceValueArray>, respectively.
150
151    If a value in <semaphoreArray> is not the name of a semaphore object,
152    an INVALID_VALUE error is generated.
153
154    The commands SignalSemaphoreui64NVX, WaitSemaphoreui64NVX and
155    ClientWaitSemaphoreui64NVX accept semaphore object names as input in
156    <semaphoreArray> that were created by CreateProgressFenceNVX or imported
157    from a handle of the type HANDLE_TYPE_D3D12_FENCE_EXT.
158    If a value in <semaphoreArray> is not the name of such a semaphore object,
159    an INVALID_VALUE error is generated.
160
161    The command
162
163      boolean IsSemaphoreEXT(uint semaphore);
164
165    can be used with progress fence semaphores and returns TRUE if <semaphore>
166    is the name of a semaphore as defined in EXT_external_objects.
167
168Issues
169
170    1) Are Vulkan semaphores imported via the GL_EXT_memory_object_win32 supported
171       by GL_NVX_progress_fence as input parameters?
172
173       RESOLVED: No. As Vulkan semaphores currently do not support progress fence
174       operation, these are not compatible with progress fence semaphores.
175
176Revision History
177
178    Revision 1, 2018-08-14 (Ralf Biermann)
179        - Initial specification proposal.
180
181    Revision 2, 2018-08-15 (Ralf Biermann)
182        - Adding Vulkan semaphore limitation to Issues.
183