Skip to content

Commit

Permalink
Fix the ABI version check.
Browse files Browse the repository at this point in the history
The EGL_EXTERNAL_PLATFORM_VERSION_CHECK macro checks whether the given
version is older than EGL_EXTERNAL_PLATFORM_VERSION_MAJOR/MINOR, not
newer.

That's correct for using it in EGL_EXTERNAL_PLATFORM_HAS, since it'll
check whether the build-time version supports a given feature, but it's
wrong for checking the ABI version that the driver reports.

Instead, use EGL_EXTERNAL_PLATFORM_VERSION_CMP.
  • Loading branch information
kbrenneman authored and amshafer committed Jul 25, 2024
1 parent 69ae9cf commit 0a50d9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wayland-external-exports.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ EGLBoolean loadEGLExternalPlatform(int major, int minor,
EGLExtPlatform *platform)
{
if (!platform ||
!EGL_EXTERNAL_PLATFORM_VERSION_CHECK(major, minor)) {
!EGL_EXTERNAL_PLATFORM_VERSION_CMP(major, minor,
WAYLAND_EXTERNAL_VERSION_MAJOR, WAYLAND_EXTERNAL_VERSION_MINOR)) {
return EGL_FALSE;
}

Expand Down

0 comments on commit 0a50d9e

Please sign in to comment.