Commit Graph

3351 Commits

Author SHA1 Message Date
Ray Strode 2cc3013c3f kms-winsys: support drm render nodes
Right now cogl does all rendering and modesetting using
/dev/dri/card0. If rendering were moved to /dev/dri/renderD128
then it would be in a better position to support offloading
rendering operations to a second gpu.

Also, some versions of the vmware driver don't support using
card0 when running on an inactive VT.  The result is crashes
low in the rendering stack.

This commit leaves card0 for modesetting operations, but defers
rendering operations to a render node.  The output is synchronized
to card0 using dma-buf. render nodes can be used even when VT
switched away, so this will fix crashes on vmware.

https://bugzilla.gnome.org/show_bug.cgi?id=753531
2015-08-27 14:49:20 -04:00
Ray Strode e4b5dbb7a1 kms-winsys: rework handling of the drm fd
At the moment the drm fd is stored in the renderer structure twice:
once for reading and once for closing. This is a little messy, and
will only get worse when we start throwing render nodes into the mix,
too.

This commit abstracts the device handling out to another structure.
Rather than having two members for each fd, this commit employees a
boolean to decide whether or not the fd needs to get explicitly closed.

https://bugzilla.gnome.org/show_bug.cgi?id=753531
2015-08-27 14:49:15 -04:00
Ray Strode 268e430548 kms-winsys: rename device_name to card_device_name
The variable device_name is currently used to hold
the name of the drm device to open ("/dev/dri/card0").
We're going to be opening other drm devices in the future
(render nodes), so device_name will become ambiguous.

This commit renames it to card_device_name

https://bugzilla.gnome.org/show_bug.cgi?id=753531
2015-08-27 14:49:10 -04:00
Ray Strode 07aa682054 kms-winsys: clean up error handling in _cogl_winsys_renderer_connect
If cogl fails to open the drm device, initialize gbm, or open the
egl display, then it closes the drm fd, uninitializes gbm, closes the
display and then calls _cogl_winsys_renderer_disconnect which does
most of those things again, on the, now deinitialized, members.

This commit removes the explicit failure handling in renderer_connect and
defers cleanup to disconnect.

https://bugzilla.gnome.org/show_bug.cgi?id=753531
2015-08-27 14:49:04 -04:00
Ray Strode 06bdc4e2c1 kms-winsys: use correct surface format
gbm confusingly has two different format types, and cogl
is using the wrong one in some of its calls to gbm_surface_create

This commit fixes the calls that are wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=753531
2015-08-27 14:48:58 -04:00
Ray Strode 8e6f30ae60 kms-winsys: drop support for old gbm versions
Right now cogl tries to accomodate older gbm versions that
have the function gbm_bo_get_pitch() instead of the more
recently named gbm_bo_get_stride().

This adds an ugly #ifdef in the code. Furthermore, we are
going to rely on newer gbm for dma-buf support anyway.

This commit drops the #ifdef.

https://bugzilla.gnome.org/show_bug.cgi?id=753531
2015-08-27 14:48:51 -04:00
Chao-Hsiung Liao afd7597f2d Updated Chinese (Taiwan) translation 2015-08-26 12:26:24 +00:00
Emmanuele Bassi 7fb7aba0ed Post-release version bump to 1.21.3 2015-08-21 11:49:57 +01:00
Emmanuele Bassi 4a3c16f4bd Release Cogl 1.21.2 (snapshot) 2015-08-21 11:42:48 +01:00
Emmanuele Bassi f4635b6bd2 Do not explicitly enable GLES v1 on distcheck
Mesa packagers disabled it explicitly on Fedora since 2013, and it makes
sense not to have people target an obsolete, barely supported API.
2015-08-21 11:41:14 +01:00
Emmanuele Bassi f20cc24292 gl: Do not use deprecated constants with the GL3 driver
glGetIntegerv (GL_DEPTH_BITS, ...) and friends are deprecated in GL3; we
have to use glGetFramebufferAttachmentParameteriv() instead, like we do
for offscreen framebuffers.

Based on a patch by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=753295
2015-08-06 16:16:30 +01:00
Marek Chalupa e7f54e6e60 egl-kms: append output after we know we found it
Otherwise we just append NULL output which is wrong and can
break things

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=752406
2015-07-28 15:32:51 +01:00
Emmanuele Bassi 7222260b40 Bump version post-branch 2015-07-28 14:31:41 +01:00
Adel Gadllah 4f8254f1ae winsys-glx: Add error traps in create_context
Both create_gl3_context and glXCreateNewContext can fail with an X error.

https://bugzilla.gnome.org/show_bug.cgi?id=742678
2015-07-26 16:04:14 +02:00
Emmanuele Bassi 853a9b6e49 conform: Mark XFAIL tests
Bisection would be useful.
2015-07-23 12:59:55 +01:00
Emmanuele Bassi 812aba31e7 winsys: Drop xlib_get_visual_info from the vtable
We don't need the hack any more; CoglRenderer has the appropriate API
for the Xlib-based winsys backends.
2015-07-22 20:28:19 +01:00
Emmanuele Bassi c9080b3e25 Use CoglRenderer for implementing deprecated, Clutter-only API
Instead of using the winsys vtable.
2015-07-22 20:27:33 +01:00
Emmanuele Bassi 8e9d3e92d8 onscreen: Use the CoglRenderer API for retrieving the X visual
Instead of peeking into the winsys vtable.
2015-07-22 20:21:33 +01:00
Emmanuele Bassi e79d571453 Store the XVisualInfo in the X11-based winsys backends
Instead of freeing it after creating the relative GL contexts, store it
in the CoglXlibRenderer data.
2015-07-22 20:20:05 +01:00
Emmanuele Bassi 19ca856810 Store XVisualInfo into the Xlib renderer
We want to be able to retrieve the XVisualInfo used when creating the
GL context under GLX and EGL-X11, so that we can use the visual before
we have an onscreen frame buffer.
2015-07-22 20:17:52 +01:00
Emmanuele Bassi 0ad995746a Avoid compiler error for uninitialized value
Fixes Cogl compilation on build.gnome.org.
2015-06-10 18:42:39 +01:00
Ting-Wei Lan c013165e41 build: Use a dot instead of source command
POSIX does not define 'source' shell command, so we should use a dot instead.

https://bugzilla.gnome.org/show_bug.cgi?id=750723
2015-06-11 00:59:21 +08:00
Emmanuele Bassi eaf816f46b build: Drop -Werror for cast-align warnings
It seems we really suck at that, or clang is really strict.

https://bugzilla.gnome.org/show_bug.cgi?id=750725
2015-06-10 17:51:03 +01:00
Emmanuele Bassi 2c054aaaaa build: Use -Werror for some compiler warnings
We care especially about the violations of C89, for portability on some
compilers.
2015-06-10 15:32:18 +01:00
Emmanuele Bassi 3290240600 egl-x11: Fix compiler warnings
Stereo mode changed two fields in the winsys vtable, so we need to
update the signature of the implementation in the EGL-X11 winsys.
2015-06-10 15:20:17 +01:00
Emmanuele Bassi 2482384312 conform: Disable deprecation warnings
The conformance test suite exercises deprecated API, so we don't need to
get compiler warnings for it.
2015-06-10 15:16:15 +01:00
Emmanuele Bassi ce7015bdb0 examples: Fix compiler warnings 2015-06-10 15:15:59 +01:00
Emmanuele Bassi 0294fc27ed examples: Do not use deprecated Cogl API
Examples should be as idiomatic as possible.
2015-06-10 15:15:20 +01:00
Emmanuele Bassi 9ab320cd3d pango: Conditionally use deprecated API
When compiling against a newer version of Pango we can avoid the
deprecation warning.
2015-06-10 15:14:30 +01:00
Emmanuele Bassi 838355afbd Fix compiler warnings
Initialize variables; GCC does not always catch all cases where the
variables are used after being initialized, especially when it comes to
out parameters.
2015-06-10 15:13:45 +01:00
Emmanuele Bassi c5dc9542d5 Include deprecated header for cogl_read_pixels()
Avoids a compiler warning for a missing declaration.
2015-06-10 14:14:06 +01:00
Emmanuele Bassi e7ef07652a Conditional call to g_type_init()
The explicit type system initialization has been deprecated since
GLib 2.36. It's done automatically, now.
2015-06-10 14:12:22 +01:00
Emmanuele Bassi 15b952e03e Fix compiler warnings
Simple enumeration checks.
2015-06-10 14:10:34 +01:00
Cédric Valmary 5069f65571 Updated Occitan translation 2015-05-30 20:25:50 +00:00
Cédric Valmary 792b3d498a Added Occitan translation 2015-05-22 20:35:22 +00:00
Rui Matos eb87ad165c framebuffer-deprecated: Unref the correct buffer
Looks like a thinko introduced by commit
79719347c8 .

Found by a coverity scan.

https://bugzilla.gnome.org/show_bug.cgi?id=749111
2015-05-08 15:39:27 +02:00
Jasper St. Pierre c1d3811ba1 Update .gitignore 2015-04-20 12:09:27 -07:00
Jasper St. Pierre f8cce5f6cb cogl-framebuffer-gl: Work again on GLESv2 2015-04-20 12:09:27 -07:00
Ray Strode 68d9ba3b65 kms-winsys: try to hobble along if driver doesn't support page flips
Some drivers ( like mgag200 ) don't yet support drmModePageFlip.

This commit forgoes waiting for vblank and flips right away
in those cases. That prevents the hardware from freezing up the screen,
but does mean there will be some visible tearing.

https://bugzilla.gnome.org/show_bug.cgi?id=746042
2015-03-23 10:11:46 -04:00
Samir Ribic 44e94c505a Added Bosnian translation 2015-03-13 20:57:37 +00:00
Chun-wei Fan 8e88fef83b MSVC Builds: Rename "Install" Projects
Rename the install projects to cogl-install, so that it is easier to
differentiate the projects when using the project set in a grand solution
file, such as a grand solution file that is used to build the entire
Clutter stack.
2015-03-06 17:48:51 +08:00
Chun-wei Fan 0809fbfe03 MSVC Builds: "Install" the .pdb Files
"Install" the .pdb files with the built DLLs and examples, as the .pdb
files are already generated for all builds, which are useful for debugging
during Cogl development, or during development of Cogl-using items.

Also be more selective on the LIBs, DLLs and EXEs that are copied, so that
we only copy the items built during Cogl compilation when the project set
is used in a grand solution, such as when building the entire Clutter
stack, which will avoid items being incorrectly copied or extra and
unneeded items being copied.
2015-03-06 17:46:18 +08:00
Chun-wei Fan 7c40f060cc Visual Studio Builds: Speed Up Release Builds
Use the multiprocessor compilation (/MP) option so that release build times
can be cut down quite a bit.  This will generate a brief warning for debug
builds as such builds use /Gm, but otherwise the build will proceed
normally albeit it would be slower.

Also use the /d2Zi+ flag for Visual Studio 2010 (and later) builds to log
more useful information in the .pdb files that are generated, to aid
debugging release builds when necessary.
2015-03-06 17:42:20 +08:00
Chun-wei Fan 4b1b912b45 MSVC 2010 Builds: Fix .pdb File Generation
To make the .pdb filename match the filename of the built target, one must
specify the .pdb file name if the target filename does not match the
project name for Visual Studio 2010 and later.  Update the projects
accordingly.
2015-03-06 17:39:17 +08:00
Chun-wei Fan 6a060d4064 Clean up MSVC 2010 "Install"
Remove from the property sheet file the empty lines that are not really
needed.
2015-03-06 17:31:03 +08:00
Robert Bragg 8cecd6899e Post-release version bump to 1.20.1 2015-02-23 20:54:20 +00:00
Robert Bragg 700dec84ad Release 1.20.0 (release) 2015-02-23 19:45:18 +00:00
Robert Bragg 0392143369 Update doc/RELEASING notes 2015-02-23 19:45:11 +00:00
Robert Bragg 21328a6376 Update NEWS for the 1.20.0 release 2015-02-23 19:45:05 +00:00
Robert Bragg da0d9757e7 Add version 1.2 define + macros 2015-02-23 18:39:34 +00:00