Skip to content

Conversation

@akihikodaki
Copy link

This pull request contains two fixes and the latter depends on the earlier. Please refer to each commit for explanation.

glDebugMessageCallback() is defined with GL_KHR_debug and on OpenGL ES
3.2, but it has the KHR suffix on the older OpenGL ES versions with
GL_KHR_debug. For OpenGL ES, libepoxy needs to resolve the function
with the KHR suffix if GL_KHR_debug is present, and to resolve it
without the suffix otherwise.

However, libepoxy incorrectly tries to resolve the function without
the suffix if GL_KHR_debug is present because it is confused with the
extension definition for desktop that doesn't use the suffix.

This can result in a non-functional resolution of
glDebugMessageCallback(). For example, an OpenGL ES implementation,
ANGLE can always resolve the function whether the name is suffixed or
not. However, the function resolved without the suffix is non-functional
if it exposes a version older than 3.2.

To fix this issue, distinguish between the extension definitions for
desktop and those for OpenGL ES. This prevents libepoxy to try resolving
glDebugMessageCallback() without the KHR suffix on OpenGL ES and lets it
try resolving it with the suffix when GL_KHR_debug is present.
eglGetPlatformDisplay() may be used to get a display for a rendering
context. However, epoxy_conservative_egl_version() cannot report a
correct version without a display and "conservatively" reports 1.4
instead. This disables eglGetPlatformDisplay(), which is available only
since 1.5.

To fix this issue, query the client version for eglGetPlatformDisplay().
The client version is a concept introduced with 1.5, and does not
require a display to query. Failing the query implies the version is
older than 1.5 and eglGetPlatformDisplay() is not supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant