Age | Commit message (Collapse) | Author | Files | Lines |
|
The cmake bits are blind copy and paste from piglit.
|
|
|
|
Commit 6fcbe52 "cmake: Refactor compiler flags into new module" exposed a bug
in the test for thread-local storage, causing the test to always fail. If the
regex "warning|error" appears in the compiler log, then the test fails. This
causes false failures when the test invokes the compiler with
'-Werror=missing-prototypes'.
Fix the regex to more closely match gcc and clang error messages.
Reported-by: Paul Berry <stereotype441@gmail.com>
Tested-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Without this, it's possible that the garbage memory returned by malloc
will have wcore_info::is_init == true, causing wcore_tinfo_init() to
skip initialization. That in turn causes a likely segfault the first
time wcore_info::error is accessed.
Fixes piglit crashes introduced by commit 6fcbe52 ("cmake: Refactor
compiler flags into new module").
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
|
|
Add new module WaffleDefineOS that defines booleans `waffle_on_linux`
and `waffle_on_mac`. Replace each check on CMAKE_SYSTEM_NAME with
a check on one of these new bools.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
After all the recent cleanups, there exists some residual formatting
that needs cleaning up.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
They were defined in the toplevel CMakeLists.txt. Move them to
`tests/CMakeLists.txt.`
This change belongs to a series that cleans up the toplevel CMakeLists
by decomposing it.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The presence of file `cmake/CMakeLists.txt` feels very strange. I found
no other project that had a CMakeLists there. Goodbye strange file.
File `cmake/CMakeLists.txt` did exactly one thing: define the install
rule for `FindWaffle.cmake`. Kill the file and move the install rule to
the toplevel CMakeLists.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Move the search for library dependencies into a new module
WaffleFindDependencies.
This change belongs to a series that cleans up the toplevel CMakeLists
by decompositing it into modules.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Checks for GLX, EGL, and Wayland were present. GBM was the only check
missing.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Move validation of options into a new module WaffleValidateOptions.
This change belongs to a series that cleans up the toplevel CMakeLists
by decompositing it into modules.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Move definition of internal options into a new module
WaffleDefineInternalOptions.
This change belongs to a series that cleans up the toplevel CMakeLists
by decompositing it into modules.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Move definition of compiler flags into a new module
WaffleDefineCompilerFlags.
This change belongs to a series that cleans up the toplevel CMakeLists
by decompositing it into modules.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Move the large block that prints the configuration summary into a new
module WafflePrintConfigurationSummary.
This change belongs to a series that cleans up the toplevel CMakeLists
by decompositing it into modules.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Rename the project 'waffle' -> 'waffle1'. This coincides better with
Waffle's library versioning. It also removes the need for the ugly hack
Waffle uses to control where GNUInstallDirs installs documentation.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This change belongs to a series that cleans up the toplevel CMakeLists
by decompositing it into modules.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
That is, rename
CheckThreadLocalStorage.cmake -> WaffleCheckThreadLocalStorage.cmake
Let's be good code citizens. If a module is private to Waffle, then
let's prefix its name with 'Waffle'. CMake, CPack, KDE3, and Qt4 also
follows this convention.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Let's be good code citizens and properly namespace our functions.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This file did several things, each not worth doing.
1. Give a basic CMake tutorial.
(It's not Waffle's responsibility to give a half-baked CMake
tutorial.)
2. List all of Waffle's custom CMake options.
(This is now covered by Options.cmake).
3. List some important make targets
(This will quickly become out-of-date).
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This makes it easy for users to find all the custom CMake options
defined by Waffle. Update the README accordingly.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Oops. This should have been squashed with the previous commit (a607232).
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This removes the imported headers:
EGL/egl.h
EGL/eglext.h
EGL/eglplatform.h
KHR/khrplatform.h
I was unwise to use imported headers for a system library. If EGL were
to change its ABI, and Waffle were linked against a libEGL that exports
the new ABI, then Waffle would risk undefined behavior due to using EGL
headers from the old ABI.
Hopefully, Khronos would never introduce such a situation. But let's not
rely on hope.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Waffle uses some EGL extensions that are fairly recent, so recent that some
systems' EGL headers lack the extensions. This header imports the needed
symbols from those extensions.
The only extension imported by this commit is EGL_KHR_create_context.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
When these EGL functions failed, waffle_display_connect() returned false
but waffle_error_get_code() returned WAFFLE_NO_ERROR. This patch emits
WAFFLE_ERROR_UNKNOWN through wegl_emit_error().
For-Stable: Candidate for 1.2.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This patch defines a wrapper for each GLX function called by the glx
directory. Each wrapper catches any Xlib error emitted by the wrapped
function. The wrapper's signature matches the wrapped.
All Xlib errors generated by Waffle must be caught by Waffle. Otherwise,
the Xlib error handler installed by the user will catch the error and
may handle it in a way Waffle doesn't like. Or, even worse, the default
Xlib error handler will catch it, which exits the process.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This patch defines a wrapper for each Xlib function called by the x11
directory. Each wrapper catches any Xlib error emitted by the wrapped
function. The wrapper's signature matches the wrapped.
All Xlib errors generated by Waffle must be caught by Waffle. Otherwise,
the Xlib error handler installed by the user will catch the error and
may handle it in a way Waffle doesn't like. Or, even worse, the default
Xlib error handler will catch it, which exits the process.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Check for MAC_OS_X_VERSION_10_6 for core vs compatibility context
handling. Fixes compilation for pre-10.6 versions, which don't define
kCGLPFAOpenGLProfile.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
|
|
This reverts commit e2cbb8648aeee9856b7897f9fa06bdd771c39ec0.
The reverted patch, if you used clang, effectively made clang>=3.2
or non-ancient gcc a requirement.
XCode 3.1 ships with an old version of gcc that does not support TLS.
There are Waffle users that require support for XCode 3.1.
Tested on Mac OS with XCode 3.1 gcc and XCode 4.6.2 clang by Nigel.
Tested-by: Nigel Stewart <nigelstewart@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
XCode 3.1 ships with an old version of gcc that does not support TLS.
There are Waffle users that require support for XCode 3.1.
Tested on Mac OS with XCode 3.1 gcc and XCode 4.6.2 clang by Nigel.
Tested-by: Nigel Stewart <nigelstewart@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
When the thread exits, teardown the thread-local data in wcore_tinfo.
Tested on Mac OS with XCode 3.1 gcc and XCode 4.6.2 clang by Nigel.
Tested-by: Nigel Stewart <nigelstewart@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The refactor prepares for supporting environments without TLS and
introduces no behavioral change.
Tested on Mac OS with XCode 3.1 gcc and XCode 4.6.2 clang by Nigel.
Tested-by: Nigel Stewart <nigelstewart@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
CMake called pkg-config on a non-existent pkgname, udev.
Fixes build with clang-3.3 if GBM is enabled.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
|
|
|
|
Added waffle_window_resize(self, width, heigh) API call. Currently
implemented only on Android, other platforms return
WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM.
Signed-off-by: Juha-Pekka Heikkila <juha-pekka.heikkila@linux.intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Recent changes required wcore_attrib_list.c to be part of compilation,
this was missing from Android.mk
Signed-off-by: Juha-Pekka Heikkila <juha-pekka.heikkila@linux.intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This reverts commit 8f778e4c6f28598ad3fc628d34bd0b96a1617f2a.
This patch broke detection of GL_ARB_create_context (and siblings) for
systems where the GLX client extension string included the extension
string but the GLX server extensions string. In this case, Waffle
incorrectly believed that the system supported GL_ARB_create_context.
This broke Piglit on such systems.
This patch was totally bogus because Paul and I failed to understand the
distinction between the GLX server extension string, the GLX client
extension string, and merged GLX extension string. This patch fixed the
use of GLX_ARB_create_context on Paul's system because his system had
a bogus GLX installed.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Previously we were using glXQueryExtensionsString() to see whether the
implementation supported ARB_create_context,
ARB_create_context_profile, and EXT_create_context_es_profile. This
is the wrong query--those extensions show up in the *client* extension
string, so we need to use glXGetClientString().
This allows us to create core contexts using GLX.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
In wcore_config_attrs.c, replace all calls to public waffle_attrib_list
functions with internal wcore_attrib_list functions.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Update waffle_attrib_list unittests to become wcore_attrib_list unittests.
If possible, we should avoid unittesting public API.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
For each function waffle_attrib_list_VERB, add function
wcore_attrib_list_VERB and implement the first with the second. The
prepares us to remove internal calls to public API.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
When printing the configuration summary, use the real names of the CMake
variables. For example, print "CMAKE_C_FLAGS_DEBUG" instead of
"CFLAGS_debug".
This eliminates some confusion caused by the fake names.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The original code in wcore_tinfo.c for handling thread local info was
a mess. It was my first time writing thread local code in a non-classroom
setting. This patch rewrites wcore_tinfo.c, reducing the lines of code
from ~130 to ~50.
The rewrite does the following:
- Require that the compiler support thread local storage through the
keyword '__thread'. This allows us to remove use of pthread_key_t.
- Remove all mutexes. There is no need to protect thread-local storage
with mutexes.
Tested with `make check-func` on GLX, XEGL, and Wayland.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
GCC has supported thread local storage through the keyword '__thread' for
a long time. Clang has supported it since 3.2. If you use clang, this
patch effectively makes clang>=3.2 a requirement.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Version and profile were swapped.
|
|
|
|
|