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
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
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
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
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
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
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
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.
Initialize variables; GCC does not always catch all cases where the
variables are used after being initialized, especially when it comes to
out parameters.
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
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.
"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.
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.
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.