core: Emit error if an integral waffle_config attr is < -1

For integral waffle_config attributes (such as WAFFLE_RED_SIZE and
WAFFLE_SAMPLES), the only valid negative value is -1, WAFFLE_DONT_CARE.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
core: Add unittests for negative integral waffle_config attributes

This patch adds unittests for the previous commit. All tests pass.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
core: Emit error if boolean waffle_config attr has bad value

That is, emit WAFFLE_ERROR_BAD_ATTRIBUTE if the value of any boolean
waffle_config attribute, such as WAFFLE_DOUBLE_BUFFERED, is neither true
nor false.  Waffle was already checking WAFFLE_DOUBLE_BUFFERED and
WAFFLE_ACCUM_BUFFER, but failed to check WAFFLE_SAMPLE_BUFFERS.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
core: Add unittests for boolean waffle_config attrs

This patch adds two unittests. Both tests pass.
    wcore_config_attrs.sample_buffers_is_bad
    wcore_config_attrs.accum_buffer_is_bad

Of the three boolean waffle_config attributes (WAFFLE_DOUBLE_BUFFERED,
WAFFLE_SAMPLE_BUFFERS, WAFFLE_ACCUM_BUFFER), only for
WAFFLE_DOUBLE_BUFFERED did a unittest exist that checked that an error was
thrown on bad values. This patch adds such a test for the other two.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
waffle: Bump version to 1.1.0

New features will soon be added. It's time to bump the version.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
waffle: add GBM platform enumeration value

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gl_basic: add gbm support

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gbm: initial skeleton for gbm support

All routines in this skeleton will fail.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gbm: initial functional gbm support

src/waffle/gbm is based on src/waffle/wayland, and then heavily
modified.

Tested as functional with: examples/gl_basic gbm gl|gles2

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gitignore: Ignore more build artifacts

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Use the GNUInstallDirs module

This adds CMake options that are familiar to autoconf users, such as
CMAKE_INSTALL_LIBDIR. Portage's cmake.eclass expects these variables
to be supported.

This replaces the following CMake options. If the user specifies any of
the old options, then emit a fatal error.
    waffle_install_includedir   -> CMAKE_INSTALL_INCLUDEDIR
    waffle_install_libdir       -> CMAKE_INSTALL_LIBDIR
    waffle_install_docdir       -> CMAKE_INSTALL_DOCDIR

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
android: Update version to 1.1.0

This matches the version specified in theCMakeLists.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
doc/building: Update with new configure options and build targets

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
include: Add WAFFLE_ERROR_BUILT_WITHOUT_SUPPORT

This error indicates that waffle was built without support for the
requested action.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
api: Emit better error messages for waffle_init()

If the user requests a platform with waffle_init(), but waffle was built
without support the platform, then emit the error:

    WAFFLE_ERROR_BUILT_WITHOUT_SUPPORT
    "waffle was built without support for WAFFLE_PLATFORM_${name}"

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
pkg/gentoo: Add waffle-1.1.0.ebuild

It's just a copy of waffle-1.0.1.ebuild.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gbm: Fix error message in gbm_config_choose

Waffle's error messages are intended for user-consumption. They shouldn't
refer to Waffle internals that do not concern users.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gbm: Remove dead error-checking code

In gbm_display_connect, there is no need to emit an error if the EGL
failed to initialize the gbm device, because the calling function has
already emitted an error.

All internal, cross-module functions emit an error on failure.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gbm: Change symbol prefix to wgbm

All symbols in the gbm directory were prefixed with 'gbm'. But that prefix
is reserved by libgbm.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gbm: Rename files after prefix change

The previous commit changed the symbol prefix in the gbm directory from
'gbm' to 'wgbm'. This commit renames the files likewise to match the new
structure names.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>