Commit graph

2 commits

Author SHA1 Message Date
Kyle Brenneman 198b0b0897 tests: Expand the MakeCurrent tests to the GLXFBConfig-based functions.
The testglxmakecurrent tests will now test both the GLXFBConfig and
XVisualInfo-based GLX functions.

The tests will also now cover using glXCreateContextAttribsARB to create a
rendering context.
2016-05-20 10:44:49 -06:00
Brian Nguyen 808706d3a2 [tests] Add make current subtests
This implements a test app, testglxmakecurrent, which verifies the
correctness of the API library's GL dispatching when a vendor's context
is current in one or more threads.

This test spawns a given number of threads each with their own separate
context and window, and has each thread make current to its given
context. The thread then calls some core GL functions and
(to-be-implemented) a GL extension function, glMakeCurrentTestResults(),
which returns the number of times each core GL function was called.
The test then compares glMakeCurrentTestResults()'s result (which should
match up with the vendor library's call count) to the application's call
count and fails if there is a mismatch.

The test is designed to only require pthreads if multiple threads are
used. This verifies that the API library's single-threaded fake pthread
wrapper functions work properly.

Add testglxmc{basic,late,loop,threads}.sh scripts, which run the
testglxmakecurrent test with different arguments for ordering of
glXGetProcAddress(), number of threads, and number of iterations.

Isolate helper functions for window creation/destruction to a separate
test_utils.c source file which will be used by later tests.
2013-08-26 11:03:43 -07:00