Commit Graph

15 Commits

Author SHA1 Message Date
baldurk 3dfa8f17ab Fix serialising program array uniforms. 2014-12-01 18:13:28 +00:00
baldurk 9748813eb1 Use serialised program initial states to translate uniform locations
* If you're capturing and replaying on the same driver it's insanely
  unlikely that this translation will be anything other than the identity
  map, although it wouldn't be illegal to renumber locations. However this
  should allow moving captures between vendors/driver versions/platforms,
  which in the past wasn't possible because locations would change (quite
  validly) when the programs were recompiled. There might be other issues,
  but at least this one is fixed.
2014-11-30 16:05:01 +00:00
baldurk e8f5e78811 Check extensions by enum and centralised checking for 'hacks'
* I need to double check the cubemap texture size query thing, I think I'm
  getting different results on a different nvidia driver (and maybe card).
2014-11-30 15:31:31 +00:00
baldurk 16dd0b77f4 Move bound vertex buffers from general state to VAO state 2014-11-25 23:58:04 +00:00
baldurk 2484bc8bc7 Use UTF-8 everywhere possible and only use wchar_t where required.
* This means that all APIs pass byte string types. ALL strings everywhere
  in the entire codebase must be assumed to be and treated as UTF-8 content
  not ASCII.
* Gets rid of all the horrible %hs specifiers that caused warnings on
  linux! Hooray.
* We convert to wide strings, or use wide characters, only when necessary
  to use the Win32 API. Some windows specific code will stay in wide chars
  just for convenience.
* Files are already serialised as UTF-8 strings for linux/windows binary
  compatibility, so this change doesn't break backwards compatibility.
2014-11-23 14:45:16 +00:00
baldurk 172a9bb9ff Globally store the GL core version and list of extensions
* For now we just store the highest core version and only re-fetch the
  extensions when we see a context of a higher version that before. This is
  just working off the assumption that there might be a low-version context
  (especially on windows where it's necessary before getting a 3.2+ core
  context), but otherwise all contexts will be the same level.
2014-11-16 12:24:10 +00:00
baldurk ca03304adb Handle special formats like GL_LUMINANCE8_EXT separately 2014-11-12 00:47:38 +00:00
baldurk b7912647cf Initial implementation of saving program uniforms at frame capture
* Previously we were saving every program uniform that got set,
  cumulatively.
* Now, whenever a uniform is set that program is marked as dirty and we
  fetch out the uniform values at the start of the frame and serialise them
  out.
* On replay, we create a dummy copy of the program to hold the initial
  uniform values, and copy them across to restore the frame-start values.
2014-11-11 22:54:57 +00:00
baldurk d318ca5182 Implement all glUniformN_ and glProgramUniformMatrixMxN_ variants
* Using macros for most implementations redirecting to either
  Serialise_glUniformVector or Serialise_glUniformMatrix
2014-11-03 22:25:11 +00:00
baldurk 72e2ed1513 Remove UNorm_SRGB component type as it's redundant 2014-09-14 20:29:25 +01:00
baldurk fc347a0235 Update to 4.5 official headers, tweak to GL enum
* GLenum enum now lists all GL_ before GLX_ and WGL_ to give priority for
  string representation.
* Also dropped eGL_UNKNOWN_ENUM for eGL_NONE as it's a little friendlier
2014-08-18 18:40:10 +01:00
baldurk 61eba9a460 Add utility functions globally for mapping shader enums <-> idx 2014-08-18 11:18:39 +01:00
Baldur Karlsson 51b840844e Handle default case in switch 2014-08-05 11:28:09 +01:00
Baldur Karlsson df86071362 Return correct ResourceFormat for GL depth formats 2014-07-28 12:03:54 +01:00
baldurk c38affcded Initial commit of existing code.
* All renderdoc code up to this point was written by me, history is available by request
2014-05-02 08:33:01 +01:00