Age | Commit message (Collapse) | Author | Files | Lines |
|
* maint-1.5:
wflinfo: Fix MSVC compilation error.
|
|
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>
|
|
* maint-1.5:
wflinfo: find glGetStringi on both Mali and WGL
waffle: return accurate result from wegl_platform_init()
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
* maint-1.4:
doc: Add release notes for Waffle 1.4.3
waffle: Bump version to 1.4.3
glx: Fix requirements for creation of ES2 context
cmake: Fix building with CMake 2.8.11
examples: Remove bitrotted XCode project files
debian: Release 1.4.2-1
Conflicts:
Android.mk
cmake/Modules/WaffleDefineVersion.cmake
Trivial version conflicts.
debian/changelog
Resolve conflicts by ignoring incoming changes.
|
|
To create an ES2 context, Waffle required
GLX_EXT_create_context_es2_profile. Fix Waffle to require either
GLX_EXT_create_context_es_profile *or*
GLX_EXT_create_context_es2_profile, because
GLX_EXT_create_context_es_profile is an updated variant of
GLX_EXT_create_context_es2_profile that supercedes it.
Fixes #24: https://github.com/waffle-gl/waffle/issues/24
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Regressed by commit 92116dae.
Waffle's CMakeLists declares that 2.8.11 is required, but commit
92116dae begin using a 2.8.12 feature: the PRIVATE keyword to
target_link_libraries(). We should not bump Waffle's CMake requirement
to 2.8.12, though, because RHEL-7 and Chrome OS still have only 2.8.11.
This patch fixes Waffle to use the PRIVATE keyword only if cmake >= 2.8.12.
Otherwise, it falls back to the LINK_INTERFACE_LIBRARIES hack removed by
92116dae.
Reported-by: Matej Cepl <mcepl@cepl.eu>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
* cooking/liuyq/fix-android-5.0-build:
Android.mk: fix problem when compile with 64bit version
droid_surfaceflingerlink.cpp: fix compiling error for android5.0
|
|
GL/*glext.h is not provided by the system (be it MinGW or MSVC), so its
path must be specified separately.
I used GLEXT_INCLUDE_DIR, which is the name also used for Piglit, so
that existing CMake initial caches might already provide it.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
* cooking/evelikov/remove-libgbm-libgl-libdeps-v2:
glx: drop explicit linking against libGL.so
glx: fetch the libGL function pointers at glx_platform_create
pkg/archlinux: demote libgbm to (make|opt)depend
gbm: drop explicit linking against libgbm.so (v2)
gbm: fetch the libgbm function pointers at wgbm_platform_init
pkg/archlinux: waffle does not link against libegl
pkg/archlinux: use configure autodetection
Conflicts:
src/waffle/gbm/wgbm_display.c
Minor conflict due to 9a4f7c0, the libglapi workaround.
|
|
* maint-1.4:
wflinfo: Fix glGetStringi on Mali
|
|
On Mali EGL 1.4, you can't obtain non-extension functions (including
OpenGL ES 3.0 functions) with eglGetProcAddress. You must use dlsym.
This patch carefully avoids breaking glGetStringi on other platforms,
which may expose glGetStringi dynamically (as in eglGetProcAddress) but
not statically (as in dlsym).
Fixes #20: https://github.com/waffle-gl/waffle/pull/20
Fixes: chromium:428061 [https://code.google.com/p/chromium/issues/detail?id=428061]
See: https://github.com/anholt/libepoxy/issues/21
Reported-by: Frank Henigman <fjhenigman@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
For versions that do not provide a shader version (GL ES 1.x, GL < 2.0)
print "None", otherwise print the value of GL_SHADING_LANGUAGE_VERSION.
None was picked because it is simple, obvious, and unlike N/A can't be
expanded into multiple meanings
v2: - Don't print for gles1, since gles1 doesn't have a shading language
and will always return FLINFO_GL_ERROR
v3: - Print 'None' for GL ES 1.x and GL < 2.0
- Only print shader_version in verbose mode
Fixes: https://github.com/waffle-gl/waffle/issues/16
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
update the version check for android 5.0 in file droid_surfaceflingerlink.cpp
Change-Id: Iee3f294dfd4951d4b2fff9cc2afeebc0d2d24802
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
|
|
* maint-1.4:
gbm: work around mesa linkage issue
|
|
Use the function pointers stored in glx_platform, to communicate
with the library.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Thus way with a follow up commit we can use them and eliminate the
link dependency from waffle.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Use the function pointers stored in wgbm_platform, to communicate
with the library.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Thus way with a follow up commit we can use them and eliminate the
link dependency from waffle.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
* cooking/evelikov/wgl: (53 commits)
man: spelling fix
man: spelling/grammar fix
README: fix spelling typo
wgl: s/glX/wgl/ in error message
README: spelling fixes
wflinfo: call get_proc_address after make_current
cmake: ensure waffle-static name differs from the shared one
cmake: Set default location for all artifacts to top-level directories
core/tests: silence the final MSVC warning
core/tests: correctly store the threads exit codes
wgl: use correct dtor in wgl_window_priv_create error path
core: silence MSVC compiler warning
wgl: strings.h does not exist in MSVC
cmake: misc fixes and cleanups
test/gl_basic_test: implement windows version for run_testsuite()
test/gl_basic_test: add PLATFORM_WGL support/tests
test/gl_basic_test: deduplicate gl_(debug,fwdcompat) tests
test/gl_basic_test: introduce linux_gles* tests
test/gl_basic_test: introduce linux_gl(30_core - 43_compat) tests
test/gl_basic_test: use all_gl_(10-21) tests for all platforms
...
|
|
Mesa drivers such as i965_dri.so use symbols from libglapi but do not
pull in libglapi (https://bugs.freedesktop.org/show_bug.cgi?id=57702)
so dlopen libglapi before we need it.
Fixes #21: https://github.com/waffle-gl/waffle/pull/21
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
* cooking/evelikov/drop-egl-linking:
egl: drop explicit linking against libEGL.so
egl: retrieve the libEGL function pointers at wegl_platform_init()
egl: add preliminary wegl_platform
|
|
* maint-1.4:
gbm: lock and release buffer in swap buffers
|
|
Otherwise mesa prints "libEGL debug: EGL user error 0x300d
(EGL_BAD_SURFACE) in dri2_swap_buffers" when environment
variable EGL_LOG_LEVEL=debug.
Fixes #17: https://github.com/waffle-gl/waffle/pull/17
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Spotted while running through piglits and the test required OGL 4.0
context on my OGL 3.3 card.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
WGL requires that an active context is available as wglGetProcAddress
is called otherwise the function pointer returned will be NULL.
v2: Rebase
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
In our current state 'make check/check-func' will succeed, but plain
'make all' will fail. This is due to naming colision when building for
Windows, as RUNTIME, LIBRARY and ARCHIVE have different meanings between
Windows and everyone else. Essentially the waffle.lib from the shared
library will clash with the one for static waffle.
Cc: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
By default, put executables into $CMAKE_BINARY_DIR/bin and libraries
into $CMAKE_BINARY_DIR/lib. Test executables still go into
$CMAKE_BINARY_DIR/test.
This patch's main purpose is to consolidate repetitive code. It doesn't
actually move anything except 'libcmocka.a'.
v2: [Emil]
- Move gl_basic_test (dynamic linked against waffle) to bin, or the
test will fail on Windows. Due to the DLL being in a different folder.
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Avoid forcing intptr_t down a variable of type int.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
The exit codes are defined as ints, while we were using an bool array.
This resulted in stack corruption due to the difference of the size in
the two types.
Huge thanks to Jose for spotting this one.
Spotted-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
This is the private ctor, as such use the private dtor if we fail at any
point. Noticed while casing wgl_window_destroy() related bug in piglit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The return type of wcore_attrib_list_length() is int32_t and at the same
time MSVC promotes the (int32_t) math at the return line to int64_t thus
causing a warning message. Explicitly cast it to make MSVC happy.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|