It appears that eglCreateSyncKHR in PVRVFrame may not be properly supporting a NULL attrib_list (SDK 2016 R1.1, Win32).
On the platform I’m testing on, PVRVFrame reports EGL_KHR_fence_sync support.
When I capture a trace, PVRTrace recorder serializes and PVRTraceGUI displays the function query for the required EGL extension functions:
[scode lang=“c”]Call UID 4114: Thread 22360: eglGetProcAddress (eglCreateSyncKHR) : 0x32e9c20
…[/scode]
The function addresses returned appear to be within libEGL.dll, which is good. However, when the app calls eglCreateSyncKHR via the function pointer, that triggers an access violation on a NULL pointer dereference, with no eglCreateSyncKHR serialized into the PVRTrace file. The line of code:
[scode lang=“c”] m_SyncObj = eglCreateSyncKHR_my( eglDisplay, EGL_SYNC_FENCE_KHR, NULL );[/scode]
Testing a theory, I changed this to:
[scode lang=“c”] EGLint attribs[] = { EGL_NONE };
m_SyncObj = eglCreateSyncKHR_my( eglDisplay, EGL_SYNC_FENCE_KHR, attribs );[/scode]
That at least gets past the crash and results in eglCreateSyncKHR, eglClientWaitSyncKHR, and eglDestroySyncKHR calls in the trace log. Though I’m still getting a hang on eglClientWaitSyncKHR, so it’s too soon to say whether there might not be another issue. Continuing to dig…
Related: In the KHR_fence_sync spec, I see:
[quote]If “type” is EGL_SYNC_FENCE_KHR, a fence sync object is created. In
this case “attrib_list” must be NULL or empty (containing only
EGL_NONE). [/quote]