Merge pull request #75 from valeriog-crytek/master

Added debugging support for GATHER4* opcodes.
Typo using wrong blend GLenum for source alpha
Serialise depth function as part of render state
DebugMessage description is an ascii string
length returned from program introspection includes space for '\0'
Add IAT based hooking to allow hooking 64bit opengl32.dll

* Needs vigorous testing in as many situations as I can think of, not least
  32bit, 64bit, D3D11, D3D9, OpenGL, managed apps, different windows SDKs,
  delay loading dlls (not sure if these will work), statically linked libs,
  LoadLibrary + GetProcAddress
* Credit goes to jslutter for originally bringing it to my attention &
  suggesting it.
* References:
  http://msdn.microsoft.com/en-us/magazine/bb985992.aspx
  http://msdn.microsoft.com/en-us/magazine/cc301808.aspx
  http://www.codeproject.com/Articles/6265/Process-wide-API-spying-an-ultimate-hack
Ignore modules with a invalid DOS magic number

* Seen in the wild some HMODULEs come back pointing 2 bytes after the real
  module base address, and so without the magic number. I don't know why
  but I can't assume anything about the behaviour so I ignore these modules
  to avoid crashes.
Skip hooking fraps via IAT for compatibility reasons
Refresh module handle if NULL when hitting GetProcAddress

* This might be a more serious problem in future...
* We only hook all loaded modules once, at init time, in Win32_IAT_EndHooks
* If a LoadLibrary call afterwards implicitly loads some modules we don't
  see them. Potentially we should rehook all loaded modules again each time
  LoadLibrary is called but then there would be a lot of redundant work
  unless we tracked module unload/loads to see if a module has been hooked
  before or not. For now assume we don't need to hook these modules and
  get away with just updating module handles
Set a sane tab order on dialogs
Handle a few declaration opcodes that had gotten missed
Fix reference to renamed variable
Fetch SV_Coverage value and fill in semantic data. Closes #74
Add slight delay before calling PixelHistory to allow for painting
Add uint type
Check bindpoint isn't -1 (for non-buffer-backed uniforms)
Handle half floats as well for position data
Sort of handle separable programs and program pipelines

* Need to find a better way of solving the non-immutable-shader-reflection
  given baked in uniform values. Probably expose the uniform values mapping
  to the user, and for D3D it just becomes trivial and unchanging.
* Also I need to create separable programs per-shader for use for
  reflection in that case, but thanks to the stupid gl_PerVertex
  redeclaration that becomes a nightmare.
Fix array overrun
Make sure outputs are always erased