KhronosGroup / EGL-Registry

EGL API and Extension Registry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does EGL_KHR_display_reference overspecify the default state?

nwnk opened this issue · comments

Forgive me if this came up in the initial extension proposal discussion, which I have not found.

The spec says the default is platform-dependent, but then goes ahead and demands what the platforms should do:

Interactions with EGL_KHR_platform_android:

    If eglGetPlatformDisplay() is called with <platform> set to
    EGL_PLATFORM_ANDROID_KHR, the default value of
    EGL_TRACK_REFERENCES_KHR is EGL_TRUE.

Interactions with EGL_EXT_platform_device, EGL_KHR_platform_gbm,
EGL_KHR_platform_x11, and EGL_KHR_platform_wayland:

    If eglGetPlatformDisplay() is called with <platform> set to
    EGL_PLATFORM_DEVICE_EXT, EGL_PLATFORM_GBM_KHR, EGL_PLATFORM_X11_KHR,
    or EGL_PLATFORM_WAYLAND_KHR, the default value of
    EGL_TRACK_REFERENCES_KHR is EGL_FALSE.

Is this really necessary? I don't especially like the non-refcounted behavior, I can't imagine a universe where you'd want it, and would prefer Mesa not do it. And I could make it do that, but then I'd need to not expose EGL_KHR_display_reference on (for example) X11 displays, which would mean the app would have no way to query what the EGL will do. Seems like it might be cleaner to just delete the explicit platform interaction text and emphasize that the default is not merely platform but implementation dependent.

I don't especially like the non-refcounted behavior

Many don't, but consistency across implementations is a good thing IMHO. We aren't going to change our default because it breaks applications relying on it, but applications and libraries relying on refcounting are free to use this extension to obtain it.

Any action here, or is feedback good for close?

I don't love the answer but it's not important enough to stress about. Closing, thanks.