Commit graph

9 commits

Author SHA1 Message Date
Kyle Brenneman 00a65e7f06 tests: Clean up any remaining contexts in EGL_dummy.
During teardown, free any remaining DummyEGLContext structs.
2022-04-08 11:23:33 -06:00
Kyle Brenneman a5688ef25e tests: Implement EGL_EXT_device_query in the dummy vendor.
Added implementations for eglQueryDisplayAttribEXT, eglQueryDeviceAttribEXT,
and eglQueryDeviceStringEXT.

Defined a new EGL_DEVICE_INDEX attribute for eglGetPlatformDisplay that uses
a device based on its index. This will allow us to test the case where
eglQueryDisplayAttribEXT returns an EGLDeviceEXT handle that libglvnd hasn't
seen before.
2021-11-25 09:58:09 -07:00
Kyle Brenneman 6d43e9bac5 tests: Add initial support for adding new devices to EGL_dummy.
Added a new function to the EGL dummy vendor called DummySetDeviceCount, which
will change the number of devices that it hands back for eglQueryDevicesEXT.

Also added a new dummy extension function, eglTestReturnDevice, which will
dispatch based on an EGLDisplay and return an EGLDeviceEXT handle. This is
used to test the new __EGLapiExports::setVendorForDevice function.
2021-11-25 09:51:20 -07:00
Kyle Brenneman a7bb6f4d19 Remove extra paragraph from license text.
Remove the "If only executable code is distributed..." paragraph from
the license text. Everything now uses a normal MIT license.

The only code from Khronos that's included in libglvnd is the EGL/GL
header and XML files, which do not contain that paragraph.

Fixes https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/221
2021-09-30 09:21:34 -06:00
Kyle Brenneman 359c99d547 tests: Add a test for eglGetError.
Add a test to check libEGL's error reporting, including errors reported by a
vendor library.
2016-11-02 17:03:31 -06:00
Kyle Brenneman b892485054 tests: Add a test for eglMakeCurrent.
Add a test for switching between different contexts across multiple vendors.
The new test also checks libEGL's recovery when a vendor's eglMakeCurrent
fails.

The EGL dummy vendor will now keep track of the current context, so that we
can test whether eglMakeCurrent calls get passed through correctly.

Also added a command to force an eglMakeCurrent call to fail, and to fetch the
the current context from directly from a vendor library.
2016-11-02 17:03:29 -06:00
Kyle Brenneman cd186e8479 tests: Add a test for EGL device functions.
Added a test for EGL_EXT_device_enumeration and EGL_EXT_platform_device, plus
dispatching to an EGL extesnion function based on an EGLDeviceEXT handle.
2016-11-02 17:03:27 -06:00
Kyle Brenneman 579e0acdb0 tests: Add a test for eglGetProcAddress.
Added a test for eglGetProcAddress and dispatching for EGL and GL functions.

Added three EGL extension functions to the EGL dummy vendor, to test
dispatching extensions by display, device, and current context.

Added a simple implementation of eglCreateContext, eglDestroyContext, and
eglMakeCurrent, and glGetString.
2016-11-02 17:03:18 -06:00
Kyle Brenneman 3e7bba599f tests: Add a basic test for eglGetPlatformDisplay.
Added two dummy libraries for EGL. They both use the same code, but each one
has a name string that can be used to check which vendor something is
dispatched to.

The dummy library is still incomplete, but more functions will be add later
along with more tests.

The test just creates an EGLDisplay using a dummy platform type, and then
checks to make sure that the display dispatches to the correct vendor library.

Also added a script to set up the test environment, and a file for common
functions and variables for EGL tests.
2016-11-02 16:37:55 -06:00