15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci NVX_progress_fence 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_NVX_progress_fence 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Ingo Esser, NVIDIA 125bd8deadSopenharmony_ci Joshua Schnarr, NVIDIA 135bd8deadSopenharmony_ci Ralf Biermann, NVIDIA 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciContact 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci Ralf Biermann, NVIDIA corporation (rbiermann'at' nvidia.com) 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciStatus 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci Complete. 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciVersion 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci Last Modified Date: August 15, 2018 265bd8deadSopenharmony_ci Author Revision: 2 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciNumber 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci OpenGL Extension #541 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciDependencies 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci This extension is written against the OpenGL 4.5 and OpenGL ES 3.2 specifications. 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci This extension requires EXT_external_objects. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci This extension requires EXT_external_objects_win32 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci This extension interacts with NV_gpu_multicast. 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciOverview 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci This extension uses the concept of GL semaphores as defined in 455bd8deadSopenharmony_ci GL_EXT_semaphore to better coordinate operations between multiple 465bd8deadSopenharmony_ci GPU command streams. A semaphore type called "progress fence" is 475bd8deadSopenharmony_ci derived from the GL semaphore. The progress fence semaphore is 485bd8deadSopenharmony_ci created by CreateProgressFenceNVX() returning the name of a newly 495bd8deadSopenharmony_ci created semaphore object. Like other semaphores, these are signaled 505bd8deadSopenharmony_ci by the GL server. Each signal operation is queued in the GPU command 515bd8deadSopenharmony_ci stream with an associated fence value that is written to the semaphore 525bd8deadSopenharmony_ci at the completion of a signal operation. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci A GL server wait can be added to the command stream using WaitSemaphoreui64NVX. 555bd8deadSopenharmony_ci This blocks the GPU until the progress fence semaphore reaches or exceeds the 565bd8deadSopenharmony_ci specified fence value. 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci A GL client wait can be initiated using ClientWaitSemaphoreui64NVX. 595bd8deadSopenharmony_ci This blocks the CPU until the specified fence value is reached. 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ciNew Procedures and Functions 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci uint CreateProgressFenceNVX(); 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci void SignalSemaphoreui64NVX(uint signalGpu, 665bd8deadSopenharmony_ci sizei fenceObjectCount, 675bd8deadSopenharmony_ci const uint *semaphoreArray, 685bd8deadSopenharmony_ci const uint64 *fenceValueArray); 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci void WaitSemaphoreui64NVX(uint waitGpu, 715bd8deadSopenharmony_ci sizei fenceObjectCount, 725bd8deadSopenharmony_ci const uint *semaphoreArray, 735bd8deadSopenharmony_ci const uint64 *fenceValueArray); 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci void ClientWaitSemaphoreui64NVX(sizei fenceObjectCount, 765bd8deadSopenharmony_ci const uint *semaphoreArray, 775bd8deadSopenharmony_ci const uint64 *fenceValueArray); 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ciNew Types 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci None 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ciNew Tokens 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci None 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 4.5 Specification (Event Model) 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci Addition to Section 4.2, "Semaphore Objects" 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci A command 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci uint CreateProgressFenceNVX(); 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci creates a named progress fence semaphore object. 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci A set of progress fence objects can be deleted by passing the names in the 995bd8deadSopenharmony_ci array <semaphores> to the command 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci void DeleteSemaphoresEXT(sizei n, const uint *semaphores); 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci Progress fence operations can be performed on named semaphore objects. The 1045bd8deadSopenharmony_ci command 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci void SignalSemaphoreui64NVX(uint signalGpu, 1075bd8deadSopenharmony_ci sizei fenceObjectCount, 1085bd8deadSopenharmony_ci const uint *semaphoreArray, 1095bd8deadSopenharmony_ci const uint64 *fenceValueArray); 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci SignalSemaphoreui64NVX inserts a signal operation for each of the <fenceObjectCount> 1125bd8deadSopenharmony_ci semaphores in <semaphoreArray>. Each signal writes the corresponding fence value in 1135bd8deadSopenharmony_ci <fenceValueArray>. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci If the GL context uses NV_gpu_multicast to control multiple GPUs, the 1165bd8deadSopenharmony_ci <signalGpu> parameter is required to specify the GPU that signals the 1175bd8deadSopenharmony_ci fence value to the fence object. Otherwise <signalGpu> must be 0. 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci If a value in <semaphoreArray> is not the name of a semaphore object, 1205bd8deadSopenharmony_ci an INVALID_VALUE error is generated. 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci If NV_gpu_multicast is supported, an INVALID_VALUE error is generated if <signalGpu> 1235bd8deadSopenharmony_ci is greater than or equal to MULTICAST_GPUS_NV. Otherwise, an INVALID_VALUE error is 1245bd8deadSopenharmony_ci generated if <signalGpu> != 0. 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci The command 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci void WaitSemaphoreui64NVX(uint waitGpu, 1295bd8deadSopenharmony_ci sizei fenceObjectCount, 1305bd8deadSopenharmony_ci const uint *semaphoreArray, 1315bd8deadSopenharmony_ci const uint64 *fenceValueArray); 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci inserts a wait command into the GL server command stream of a specified GPU <waitGpu> 1345bd8deadSopenharmony_ci for each of the <fenceObjectCount> progress fence objects in <semaphoreArray> which 1355bd8deadSopenharmony_ci blocks <waitGpu> until all fence objects reach or exceed the associated fence value 1365bd8deadSopenharmony_ci in <fenceValueArray>. 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci If a value in <semaphoreArray> is not the name of a semaphore object, 1395bd8deadSopenharmony_ci an INVALID_VALUE error is generated. 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci The command 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci void ClientWaitSemaphoreui64NVX(sizei fenceObjectCount, 1445bd8deadSopenharmony_ci const uint *semaphoreArray, 1455bd8deadSopenharmony_ci const uint64 *fenceValueArray); 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci blocks the CPU until each of the <fenceObjectCount> fence objects in a 1485bd8deadSopenharmony_ci specified array <semaphoreArray> reaches the corresponding fence value 1495bd8deadSopenharmony_ci in <fenceValueArray>, respectively. 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ci If a value in <semaphoreArray> is not the name of a semaphore object, 1525bd8deadSopenharmony_ci an INVALID_VALUE error is generated. 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci The commands SignalSemaphoreui64NVX, WaitSemaphoreui64NVX and 1555bd8deadSopenharmony_ci ClientWaitSemaphoreui64NVX accept semaphore object names as input in 1565bd8deadSopenharmony_ci <semaphoreArray> that were created by CreateProgressFenceNVX or imported 1575bd8deadSopenharmony_ci from a handle of the type HANDLE_TYPE_D3D12_FENCE_EXT. 1585bd8deadSopenharmony_ci If a value in <semaphoreArray> is not the name of such a semaphore object, 1595bd8deadSopenharmony_ci an INVALID_VALUE error is generated. 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci The command 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci boolean IsSemaphoreEXT(uint semaphore); 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci can be used with progress fence semaphores and returns TRUE if <semaphore> 1665bd8deadSopenharmony_ci is the name of a semaphore as defined in EXT_external_objects. 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ciIssues 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci 1) Are Vulkan semaphores imported via the GL_EXT_memory_object_win32 supported 1715bd8deadSopenharmony_ci by GL_NVX_progress_fence as input parameters? 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci RESOLVED: No. As Vulkan semaphores currently do not support progress fence 1745bd8deadSopenharmony_ci operation, these are not compatible with progress fence semaphores. 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ciRevision History 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci Revision 1, 2018-08-14 (Ralf Biermann) 1795bd8deadSopenharmony_ci - Initial specification proposal. 1805bd8deadSopenharmony_ci 1815bd8deadSopenharmony_ci Revision 2, 2018-08-15 (Ralf Biermann) 1825bd8deadSopenharmony_ci - Adding Vulkan semaphore limitation to Issues. 183