i am trying to use glFlush + glFenceSync to alternate glFinish, but it seems that this doesn’t work.
my code looks like follow:
while(1) {
glDrawArray();
sync = glFenceSyncAPPLE(GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE, 0);
enqueueSync(sy nc);
glFlush();
sync = getSyncQueueHeader()
glGetSyncivAPPLE(sync, GL_SYNC_STATUS_APPLE, 1, NULL, status)
if (status == GL_SIGNALED_APPLE) {
dequeueSync();
dosomethingelse()
}
}
i am not sure if my code is alright or just i need some more time to get my signal after glFlush? thanks!
Hi Rory,
Using the EGL version of this functionality works on our drivers to do this at least in all the tests I’ve done myself - unfortunately the fence syncs you’re using are specific to Apple’s version of the drivers. If you’re encountering a problem with these functions I’m afraid you’ll have to get in contact with Apple directly, as we won’t be able to help.
Regards,
Tobias