summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-02-02Merge branch 'maint-1.5' into masterHEADmasterChad Versace1-1/+2
* maint-1.5: wflinfo: Fix MSVC compilation error.
2015-02-02waffle: make gl_basic to work with naclTapani Pälli5-3/+118
v2: fixes in cmake (Emil Velikov, Chad Versace) Changed also nmf file content and generation, moved nacl example content to separate output path. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-02-02wflinfo: Fix MSVC compilation error.Jose Fonseca1-1/+2
Workaround what seems to be a bug in MSVC parser for C99. http://lists.freedesktop.org/archives/waffle/2015-January/000975.html Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-01-27Merge branch 'maint-1.5' into masterChad Versace2-21/+21
* maint-1.5: wflinfo: find glGetStringi on both Mali and WGL waffle: return accurate result from wegl_platform_init()
2015-01-27wflinfo: find glGetStringi on both Mali and WGLFrank Henigman1-21/+19
Do the glGetStringi lookup after making context current so it works on WGL. Remove an incorrect glGetStringi lookup, which returned NULL on Mali. Signed-off-by: Frank Henigman <fjhenigman@google.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-01-27waffle: return accurate result from wegl_platform_init()Frank Henigman1-0/+2
wegl_platform_init() now returns false if dlopen or dlsym fails. Signed-off-by: Frank Henigman <fjhenigman@google.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-01-27Merge branch 'chadv/waffle_window_create2' into masterChad Versace34-175/+616
* waffle_window_create2: examples/gl_basic: Update to use waffle_window_create2() tests/gl_basic: Update to use waffle_window_create2() waffle: Add public func waffle_window_create2() core: Add func wcore_attrib_list_pop() core: Add func wcore_attrib_list_copy() core: Add attrib_list param to func wcore_platform::window::create core: Add func wcore_error_bad_attribute waffle: Fix signature of wcore_platform::window::create() waffle: Fix mismatch in waffle_window_create prototype core: Add func wcore_attrib_list_from_int32 core: Add arithmetic functions that detect overflow core: Define intptr_t variants of wcore_attrib_list functions core: Define wcore_attrib_list funcs with type-generic template core: Change return type of wcore_attrib_list32_length core: Rename functions s/wcore_attrib_list/wcore_attrib_list32/ include: Deprecate waffle_attrib_list funcs include: Define macro WAFFLE_DEPRECATED_1_06
2015-01-27examples/gl_basic: Update to use waffle_window_create2()Chad Versace1-2/+11
Tested on GLX, X11/EGL, Wayland, and GBM. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27tests/gl_basic: Update to use waffle_window_create2()Chad Versace1-2/+7
Tested on GLX, X11/EGL, and Wayland. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27waffle: Add public func waffle_window_create2()Chad Versace6-9/+119
Today, waffle_window() has only two parameters: width and height. Frank Henigman wants to extend Waffle's GBM backend with the ability to post window contents to the display. Multiple methods exist for posting content to the screen with the drm API, and that method should be configurable per waffle_window. Therefore, we need to be able to pass additional attributes to waffle_window_create(). It would also be nice to specify at time of creation that the waffle_window should be full screen. Again, we need to pass additional attributes to waffle_window_create(). The new function waffle_window_create2() is conceptually equivalent to the original waffle_window_create() with the addition of an attrib_list parameter. The only supported attributes are currently WAFFLE_WINDOW_WIDTH and WAFFLE_WINDOW_HEIGHT. See the manpage changes for more details. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Add func wcore_attrib_list_pop()Chad Versace2-0/+46
This is useful for removing attributes as they are parsed. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Add func wcore_attrib_list_copy()Chad Versace2-0/+40
This is useful for making a writable copy of a read-only attribute list. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Add attrib_list param to func wcore_platform::window::createChad Versace15-18/+74
This prepares for adding waffle_window_create2() to Waffle's public API, which will have an attrib_list parameter. No attributes are supported yet. Therefore this patch validates, at the top of each ${PLATFORM}_window_create(), that the attrib_list is empty. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Add func wcore_error_bad_attributeChad Versace2-0/+12
This little helper function emits WAFFLE_ERROR_BAD_ATTRIBUTE with a default error message. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27waffle: Fix signature of wcore_platform::window::create()Chad Versace14-33/+33
Fix signature to match that of waffle_window_create(). The types of parameters 'width' and 'height' didn't match the public header. As a consequence, also fix the signature of ${PLATFORM}_window_create() for all platforms. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27waffle: Fix mismatch in waffle_window_create prototypeChad Versace1-1/+1
The prototype differed between the public header and file waffle_window.c. This is solely a cosmetic change, because 'int' and 'int32_t' are the same on all platforms supported by Waffle. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Add func wcore_attrib_list_from_int32Chad Versace2-0/+52
This function converts an int32_t attribute list to an intptr_t attribute list. It will be needed in the future when updating waffle_config_choose() to accept an intptr_t attribute list. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Add arithmetic functions that detect overflowChad Versace2-0/+49
Define the function below. All act on size_t inputs. wcore_add_size wcore_iadd_size : in-place addition wcore_mul_size wcore_imul_size : in-place multiplication Future patches will use the functions to safely calculate the 'size' value given to malloc. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Define intptr_t variants of wcore_attrib_list functionsChad Versace2-0/+29
When designing the original Waffle 1.0 API, I made a mistake when I chose to declare attribute lists as arrays of int32_t. Instead, they should have been arrays of intptr_t. A new public function, waffle_window_create2, will have a `const intptr_t attrib_list[]` parameter. Therefore waffle needs intptr_t variants of the wcore_attrib_list functions. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Define wcore_attrib_list funcs with type-generic templateChad Versace1-70/+82
The current wcore_attrib_list functions work on int32_t attribute lists. A future commit will add variants that work on intptr_t attribute lists. To prevent code duplication, this patch moves the definition of all wcore_attrib_list32 functions into a type-generic macro, WCORE_ATTRIB_LIST_COMMON_FUNCS, which will also be used to define the upcoming intptr_t functions. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Change return type of wcore_attrib_list32_lengthChad Versace2-3/+4
Change from int32_t to size_t, because - Length is a measurement of unsigned "size". - In general, length values are often used in subsequent calculation of memory size which is passed to functions like malloc, whose input is size_t not int. - The cast from ptrdiff_t to int32_t in wcore_attrib_list_length just looked wrong. A cast to size_t makes more sense. As precedent, strlen() also returns size_t. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27core: Rename functions s/wcore_attrib_list/wcore_attrib_list32/Chad Versace5-74/+74
When designing the original Waffle 1.0 API, I made a mistake when I chose to declare attribute lists as arrays of int32_t. Instead, they should have been arrays of intptr_t. A new public function, waffle_window_create2, will have a `const intptr_t attrib_list[]` parameter. Therefore waffle needs intptr_t variants of the wcore_attrib_list functions. This patch makes room for the new intptr_t wcore_attrib_list functions by renaming the old ones. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27include: Deprecate waffle_attrib_list funcsChad Versace2-8/+14
It was a mistake when I decided to make Waffle's attribute lists 32-bit. Instead, the lists should have had type intptr_t[] to allow pointer input-output. To correct that original mistake, I will soon introduce some new public functions that have `intptr_t attrib_list[]` parameters. I'm deprecating the waffle_attrib_list functionss because I don't want to maintain two variants (int32_t and intptr_t) of each function. They offer little utility to users, so I see little benefit in trying maintain both variants. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-27include: Define macro WAFFLE_DEPRECATED_1_06Chad Versace1-0/+14
This macro annotates symbols as deprecated in Waffle 1.6. The compiler emits deprecation warnings only if the user enables the feature macro for the Waffle 1.6 API. Emil provided the deprecation annotation for MSVC. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-24Merge branch 'maint-1.5'Jordan Justen2-1/+8
* maint-1.5: debian: Release 1.5.1-1 debian: Update standards version to 3.9.6
2015-01-22debian: Release 1.5.1-1Jordan Justen1-0/+7
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2015-01-22debian: Update standards version to 3.9.6Jordan Justen1-1/+1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2015-01-22Merge branch 'maint-1.5' into masterChad Versace2-0/+82
* maint-1.5: doc: Add release notes for Waffle 1.5.1 waffle: Bump version to 1.5.1 doc: Add release notes for Waffle 1.4.4 waffle: Bump version to 1.4.4
2015-01-22doc: Add release notes for Waffle 1.5.1Chad Versace1-0/+50
Signed-off-by: Chad Versace <chad.versace@intel.com>
2015-01-22waffle: Bump version to 1.5.1Chad Versace2-2/+2
Signed-off-by: Chad Versace <chad.versace@intel.com>
2015-01-22Merge branch 'maint-1.4' into maint-1.5Chad Versace1-0/+32
* maint-1.4: doc: Add release notes for Waffle 1.4.4 waffle: Bump version to 1.4.4
2015-01-22doc: Add release notes for Waffle 1.4.4Chad Versace1-0/+32
Signed-off-by: Chad Versace <chad.versace@intel.com>
2015-01-22waffle: Bump version to 1.4.4Chad Versace2-2/+2
Signed-off-by: Chad Versace <chad.versace@intel.com>
2015-01-20Merge branch 'tpalli/nacl' into masterChad Versace26-5/+961
* cooking/tpalli/nacl: waffle: update man pages with nacl changes waffle: initial empty implementation of nacl backend waffle: add support for building Waffle using NaCl toolchain examples: add waffle_has_x11_egl check for simple-x11-egl
2015-01-19waffle: update man pages with nacl changesTapani Pälli2-0/+9
Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-01-19waffle: initial empty implementation of nacl backendTapani Pälli17-2/+816
Patch adds nacl platform skeleton. Only thing it does is that it creates a container that holds the 3D context object which is responsible for any communication required with browser. v2: cleanups, remove unnecessary casts, use c99 initializer (Emil Velikov) v3: additional code cleanups (Chad Versace) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-01-19waffle: add support for building Waffle using NaCl toolchainTapani Pälli8-2/+135
Patch adds changes required to use NaCl compiler and libraries to build Waffle. Build can be configured to use specific version of the NaCl SDK, toolchain for the build needs to be selected with cmake variable CMAKE_TOOLCHAIN_FILE. Example command line to configure a build: cmake -Dwaffle_has_nacl=ON \ -Dnacl_sdk_path=/home/tpalli/nacl/nacl_sdk \ -Dnacl_version=pepper_39 \ -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-nacl-x86_64-glibc.cmake \ -DCMAKE_BUILD_TYPE=Release \ . v2: cmake fixes, create toolchain files for nacl (Emil Velikov) v3: rename toolchain files, cmake fixes (Chad Versace, Emil Velikov) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-01-19examples: add waffle_has_x11_egl check for simple-x11-eglTapani Pälli1-1/+1
v2: remove redudant parenthesis (Chad) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-01-19Merge branch 'maint-1.5'Jordan Justen1-1/+2
* maint-1.5: debian: Add WaffleConfig*.cmake to libwaffle-dev package
2015-01-19Merge branch 'maint-1.4' into maint-1.5Jordan Justen1-1/+2
* maint-1.4: debian: Add WaffleConfig*.cmake to libwaffle-dev package
2015-01-19debian: Add WaffleConfig*.cmake to libwaffle-dev packageJordan Justen1-1/+2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2014-12-31cmake: remove FindWaffle.cmakeDylan Baker2-86/+2
This is superseded by the WaffleConfig and WaffleConfigVersion cmake files. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2014-12-31Merge branch 'maint-1.5'Chad Versace8-13/+74
* maint-1.5: cmake: Add cmake PackageConfig files cmake: fix version search wgl: Verify the client area size matches the required size on window creation too. examples/gl_basic: Add option for window size. test/gl_basic_test: Address gcc format mismatch warning. wgl: Fix requirements for creation of ES2 context
2014-12-31Merge branch 'maint-1.4' into maint-1.5Chad Versace4-5/+42
* maint-1.4: cmake: Add cmake PackageConfig files cmake: fix version search
2014-12-31cmake: Add cmake PackageConfig filesDylan Baker3-1/+40
This creates and installs a package version file and a package config file. These are used by find_package with the CONFIG option, and are roughly equivalent to pkgconfig, but is cmake specific rather than linux specific. v2: - Use configure_package_config_file() instead of config_file(), which generates helper macros and resolves relative paths allowing the entire install to be moved. - Update WaffleConfig.cmake.in to take advantage of configure_package_config_file() - Use SameMajorVersion instead of AnyNewerVersion for version compatibility. Since waffle uses apache's numbering scheme 2.0.0 should not fulfill a requirement of 1.5.0 and vice versa. v3: - Use CMAKE_BINARY_DIR (Jordan) - Move generation of cmake config to the same area of the cmake file as pkgconfig Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2014-12-31cmake: fix version searchDylan Baker1-4/+2
Currently the cmake file uses both WAFFLE_INCLUDE_DIR and WAFFLE_INCLUDE_DIRS, but only the DIRS version is actually defined. cmake doesn't complain about the undefined variable, instead it treats it as a blank string. This leads to the version never being checked. This patch replaces DIR with DIRS, which corrects the problem. Fixes #27: https://github.com/waffle-gl/waffle/issues/27 Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2014-12-31wgl: Verify the client area size matches the required size on window ↵José Fonseca1-1/+11
creation too. By default, Windows will limit windows too large to theu desktop size, and windows too small to be big enough for the titlebar. Waffle's windows don't get affected as their style is WS_POPUPWINDOW, which doesn't include the WS_CAPTION style. This change adds more assertion, just in case this ever changes, as many piglit tests rely on large/tiny windows to have the requested size. Also replace `#ifdef DEBUG` with `#ifndef NDEBUG`, as NDEBUG is the define that controls assert macro. That said, I wonder if we should call `waffle_errorf(WAFFLE_ERROR_INTERNAL, ...)` and verify this on release builds too. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2014-12-31examples/gl_basic: Add option for window size.José Fonseca1-5/+17
Useful to test huge/tiny windows. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2014-12-31test/gl_basic_test: Address gcc format mismatch warning.José Fonseca1-1/+1
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2014-12-31wgl: Fix requirements for creation of ES2 contextChad Versace1-1/+3
To create an ES2 context, Waffle required WGL_EXT_create_context_es2_profile. Fix Waffle to require either WGL_EXT_create_context_es_profile *or* WGL_EXT_create_context_es2_profile, because WGL_EXT_create_context_es_profile is an updated variant of WGL_EXT_create_context_es2_profile that supercedes it. Fixes #23: https://github.com/waffle-gl/waffle/issues/23 Reviewed-by: José Fonseca <jfonseca@vmware.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>