[Piglit] [PATCH] egl_khr_fence_sync: check for EGL_KHR_reusable_sync

Daniel Kurtz djkurtz at chromium.org
Tue Oct 14 01:10:44 PDT 2014

Hi Chad,

I took a look at running the egl_khr_fence_sync test again recently,
and Ilja's patch fixed one issue, but it didn't actually address the
original problem I had when running this test using the Mali driver.

I have been running piglit using epoxy dispatch.
Epoxy builds its dispatch tables from the khronos registry provided by
xml files, such as registry/egl.xml.
The problem is that this registry only defines the four functions for
EGL_KHR_reusable_sync, but not for EGL_KHR_fence_sync:

        <extension name="EGL_KHR_fence_sync"
protect="KHRONOS_SUPPORT_INT64" supported="egl">
                <!-- @ Most interfaces defined by EGL_KHR_reusable sync -->
                <enum name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR"/>
                <enum name="EGL_SYNC_CONDITION_KHR"/>
                <enum name="EGL_SYNC_FENCE_KHR"/>
        <extension name="EGL_KHR_reusable_sync"
protect="KHRONOS_SUPPORT_INT64" supported="egl">
                <enum name="EGL_SYNC_STATUS_KHR"/>
                <enum name="EGL_SIGNALED_KHR"/>
                <enum name="EGL_UNSIGNALED_KHR"/>
                <enum name="EGL_TIMEOUT_EXPIRED_KHR"/>
                <enum name="EGL_CONDITION_SATISFIED_KHR"/>
                <enum name="EGL_SYNC_TYPE_KHR"/>
                <enum name="EGL_SYNC_REUSABLE_KHR"/>
                <enum name="EGL_SYNC_FLUSH_COMMANDS_BIT_KHR"/>
                <enum name="EGL_FOREVER_KHR"/>
                <enum name="EGL_NO_SYNC_KHR"/>
                <command name="eglCreateSyncKHR"/>
                <command name="eglDestroySyncKHR"/>
                <command name="eglClientWaitSyncKHR"/>
                <command name="eglSignalSyncKHR"/>
                <command name="eglGetSyncAttribKHR"/>

Thus, when using a driver like mali, which has EGL_KHR_fence_sync but
not EGL_KHR_reusable_sync, epoxy cannot find a provider for
eglCreateSyncKHR and fails:

# DISPLAY=:0 /usr/local/piglit/lib/piglit/bin/egl_khr_fence_sync -fbo -auto
No provider of eglCreateSyncKHR found.  Requires one of:
    EGL extension "EGL_KHR_reusable_sync"

I created a new epoxy issue for this github:

Note: I think this is fixed for EGL 1.5+, since it has
EGL_KHR_fence_sync built-in:

    <feature api="egl" name="EGL_VERSION_1_5" number="1.5">
        <require comment="EGL_KHR_fence_sync">
            <enum name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE"/>
            <enum name="EGL_SYNC_TYPE"/>
            <enum name="EGL_SYNC_STATUS"/>
            <enum name="EGL_SYNC_CONDITION"/>
            <enum name="EGL_SIGNALED"/>
            <enum name="EGL_UNSIGNALED"/>
            <enum name="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
            <enum name="EGL_FOREVER"/>
            <enum name="EGL_TIMEOUT_EXPIRED"/>
            <enum name="EGL_CONDITION_SATISFIED"/>
            <enum name="EGL_NO_SYNC"/>
            <enum name="EGL_SYNC_FENCE"/>
            <command name="eglCreateSync"/>
            <command name="eglDestroySync"/>
            <command name="eglClientWaitSync"/>
            <command name="eglGetSyncAttrib"/>

On Thu, Aug 21, 2014 at 6:20 AM, Chad Versace
<chad.versace at linux.intel.com> wrote:
> On 08/18/2014 07:46 PM, Daniel Kurtz wrote:
> > On Tue, Aug 19, 2014 at 7:05 AM, Chad Versace
> > <chad.versace at linux.intel.com> wrote:
> >> On 08/13/2014 07:13 PM, Daniel Kurtz wrote:
> >>>
> > I think the original reason why I wrote this patch was to address
> > build breakage due to the incomplete dispatch (using symbol
> > eglCreateSyncKHR instead of egl-looked-up peglCreatSyncKHR).
> > This is fixed by Ilja's patch, which I assume he is going to send
> > upstream shortly.
> Ilja didn't submit to the list. But I pulled the patch out the ebuild directory
> and commited it to master.

More information about the Piglit mailing list