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.
We can't just destroy and replace the EGL and gbm surfaces while
they are still in use i.e. while there is a pending flip. In fact, in
that case, we were calling gbm_surface_destroy() on a surface that
still had the front buffer locked and then, on the flip handler,
gbm_surface_release_buffer() for a buffer that didn't belong to the
new surface.
Instead, we still allocate new surfaces when requested but they only
replace the old ones on the next swap buffers when we're sure that the
previous flip has been handled and buffers properly released.
Currently the code queries the current msc then tries to approximate the
value of the next msc satisfing the modulus 2 for when to wait. This
introduces some instability as the msc may tick over during the
roundtrip leading to a 32ms wait instead of a 16ms wait. This happens
often enough to cause jerky animations, and affect gnome-shell-perf-tool.
A simpler solution is just use a single roundtrip by using WaitForMsc to
ask the driver to compute the next vblank itself.
Cc: Owen W. Taylor <otaylor@fishsoup.net>
Cc: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Robert Bragg <robert@sixbynine.org>
If --stereo is passed, then the texture pixmap is created as a stereo
texture pixmap, and also, if passed in conjunction with --gears,
glxgears is also run with the -stereo option.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
If --gears is passed on the command line, glxgears is run, and
is used for the source window rather than drawing solid rectangles
into a window we create outselves.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
Add cogl_texture_pixmap_x11_new_left() and
cogl_texture_pixmap_x11_new_right() (which takes the left texture
as an argument) for texture pixmap rendering with stereo content.
The underlying GLXPixmap is created using a stereo visual and shared
between the left and right textures.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
If we want to show quad-buffer stereo with Cogl, we need to pick an
appropriate fbconfig for creating the CoglOnscreen objects. Add
cogl_onscreen_template_set_stereo_enabled() to indicate whether
stereo support is needed.
Add cogl_framebuffer_get_stereo_mode() to see if a framebuffer was
created with stereo support.
Add cogl_framebuffer_get_stereo_mode() to pick whether to draw to
the left, right, or both buffers.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>