Merge pull request #218 from kleinerm/master

PTB BETA RELEASE "Random acts of kindness" Psychtoolbox-3.0.12 - SP3

Get the Linux and Windows Screen mex file rebuilt as well.
Merge pull request #221 from kleinerm/master

Pull for small beta update.

* Gaussblob procedural shader.
* Mini 4-channel mix shader.
* Demo cleanups and refinements.
* KbQueueReserve fix.
* Some DRI3/Present prep work for Linux - not relevant yet.
Fixed buglet where SaveCalFile could crash if passed filename was short.

Signed-off-by: David Brainard <brainard@psych.upenn.edu>
Fix way that full file path is computed to use fullfile.  This is more robust.

Signed-off-by: David Brainard <brainard@psych.upenn.edu>
MergeCell did not handle empty inputs as it should (ignoring/early exit)
Merge pull request #223 from dcnieho/MergeCell_patch

MergeCell did not handle empty inputs as it should (ignoring/early exit)
Screen: Add NVidia Maxwell support for beamposition timestamping.

Our detection code didn't handle chip id's > 0xff, but Maxwell
has id's of >= 0x110, which wrapped around to 0x10 for NV-10 class
prehistoric hardware, causing beampos query failure.

Update code for at least the 0x100 range to handle Maxwell's
display engine. Also adjut our d0 vs. e0 family mapping properly,
something we omitted in the past. This doesn't cause a functional
change but makes the logic easier to understand - less head scratching!

This sync us up with nouveau's Linux 3.18 behaviour.

-> Screen for 64-Bit Octave on Linux rebuilt, but not tested due
   to lack of test hardware.

-> Rebuild for Screen on Matlab and on OSX pending.
Merge branch 'master' of https://github.com/kleinerm/Psychtoolbox-3

Conflicts:
	Psychtoolbox/PsychBasic/Octave3LinuxFiles64/Screen.mex
Screen for 64-Bit Octave on Linux rebuilt to resolve merge conflict.
Screen for 64-Bit Matlab on Linux rebuilt with Nvidia Maxwell support.

-> Untested.
Screen for 64-Bit Octave/Matlab on OS X rebuilt for Nvidia Maxwell support.

-> Untested.
Screen for 32-Bit Octave on Linux rebuilt for Nvidia Maxwell support.

-> Untested.
Screen/dc1394: appsink enable-last-buffer --> enable-last-sample fix.

Name of appsink property changed for GStreamer 1.x to make life
more interesting. Fix up our code for GStreamer post-processing
in the dc1394 video capture backend.
Merge branch 'master' of https://github.com/kleinerm/Psychtoolbox-3
Screen/dc1394: Minor improvements to dc1394 capture engine.

More debug output for (non-)Format-7 setup code.
Accept capturerate DBL_MAX aka realmax in Format-7 mode.

-> Lot's of mostly unsucessfull attempts at improving fps in
   Format-7 mode.

-> Don't get any framerates even remotely close to what the
   vendor claims, at least not on this tested controller.

-> Framerate reporting in Format-7 is completely bogus.

-> At least we now know that non-Format-7 works correctly
   but provides lower fps because the camera tells something
   else than what the manual claims.

-> At least Format-7 modes now mostly work, although at too
   low fps. And full resolution on the Flea is achieved.

   Key is to set usbcore.usbfs_memory_mb=1000 at Linux bootloader
   or during runtime as module parameter. The default of 16 MB
   causes out of memory URB allocation failures for higher resolution
   video modes.

-> Screen for 64-Bit Octave on Linux rebuilt and tested.
New demos: ImageMixingTutorial, SimpleImageMixingDemo.

The two demos showing some flexible, easy on the brain way
to use alpha-blending for mixing to images with per-pixel
weight masks that are dynamically generated/updated.

ImageMixingTutorial - Advanced and a show off.
SimpleImageMixingDemo by Natalia - understandable by mortals ;-)
Merge branch 'master' of https://github.com/kleinerm/Psychtoolbox-3
More tweaking to xorg.conf files for intel gpus

- comment out BusId for multi x-screen by default, as
  this is only needed on multi-gpu setups, redundant
  on single-gpu setups.

- Comment out Option "DRI" "2" by default, because it is
  pretty deadly on a non-DRI3 enabled intel ddx, e.g., the
  one shipping with Ubuntu 14.04-LTS or with our own customized
  ddx.
Ship our own custom built Linux graphics drivers for 64-Bit Ubuntu 14.04 / XOrg 1.15.

The new folder Psychtoolbox/PsychHardware/LinuxDrivers contains
binary builds of nouveau-ddx 1.0.11 for 64-Bit Ubuntu 14.04 LTS
and other 64-Bit XOrg 1.15 distributions. The nouveau 1.0.10 ddx
shipping with Ubuntu 14.04-LTS is badly broken for visual stimulation,
so ship our own 1.0.11 build which fixes most known problems and
makes nouveau on 14.04-LTS so much better for visual stimulation.

The folder also contains a patched build of intel-ddx 2.99.917
for 64-Bit Ubuntu 14.04-LTS and other 64-Bit XOrg 1.15 distros.
This latest version of intels ddx fixes Multi-X-Screen ZaphodHeads
operation properly for our purpose. It is a safe to use DRI2 build
only and i patched it to disable TripleBuffering by default, as
DRI2 TripleBuffering on Intel is still hazardous for stimulation
timing. The latest ddx put in some extra effort to make triple
buffering work with precise timing and timestamping, so kudos for
that! However, there are still some corner cases which cause PTB to
throw some scary warnings during startup, although most of these are
now false positives. Probably i could work around remaining issues,
but i'm just too tired of reviewing those convoluted intel DRI2 code
paths and it wouldn't work with earlier PTB releases, e.g., 3.0.11,
so the more simple and safe solution is to simply force triple
buffering off on DRI2, as we did in the past. Given we ship our
own driver build anyway for the multi-x-screen fixes, we can do
away with the need to have xorg.conf files and simply patch
Option TripleBuffer to off for added user convenience.

For now these builds are only for 64-Bit distros with XOrg 1.15
like Ubuntu 14.04-LTS, as i expect most users to be on those
distros and i don't want to go through the extra hassle of setting
up build environments for old 32-Bit systems atm.

Wrt. Ubuntu 14.10 / XOrg 1.16 there isn't any need for custom
nouveau-ddx as 14.10 already ships nouveau 1.0.11 which is good.
I'm not yet decided on the need for a patched intel-ddx. The
2.99.914 ddx of 14.10 may already fix the multi-x-screen issues,
needs testing. If 14.10 would get upgraded to XOrg 1.16.3 soon,
which contains critical bug fixes from Axel Davy and me, then we
could finally use DRI3/Present instead of DRI3, and it would be
awesome on Intel, and it would solve the TripleBuffer issue as
well in a very elegant way. XOrg 1.16.3 is released upstream, i
just don't know if and when 14.10 will receive an upgrade.

The folder also contaisn tar.gz files of the nouveau and intel
source trees to satsify potential license requirements, and the
patch i applied to the intel ddx, so we can easily patch future
ddx releases.

-> The ati-ddx doesn't need any custom builds, it is as bug free
   and beautiful as ever in all shipping distro default releases :-)
Screen for 64-Bit Octave on Linux rebuilt against 14.04 build system.