Commit Graph

721 Commits

Author SHA1 Message Date
baldurk ad352cebc3 Only apply vertexOffset when fetching input vertex data 2014-11-27 23:16:20 +00:00
baldurk c7e83dcaf2 Ignore shader op restype, and copy 32byte types literally
* This prevents e.g. copy as float modifying the data if it's actually an
  int and it evalutes to a NaN.
2014-11-27 22:24:50 +00:00
baldurk 2040a57e5d Check for new versions even if we think one is available
* This way if someone updates their install without clicking the menu item
  to clear this flag, it will still detect the update after a few days.
* (And when I forget to update which beta is latest, it will fix itself
  eventually. Oops).
2014-11-27 21:08:41 +00:00
baldurk de7cabe6f3 Don't read off end of indices buffer data if it's not big enough
* Fix for uploaded crash report.
2014-11-27 21:02:27 +00:00
baldurk 5ad5a0af49 Potentially overestimate compressed image size to avoid crashes
* I need to investigate this more. It seems that on AMD the compressed
  image size returned is the size of the whole cubemap, and then you get
  each face one-by-one. On nVidia the compressed image size is the size of
  one face, so dividing by 6 gives too little space.
* I don't know which one is standard correct, but that kind of doesn't
  matter since I probably need to query the size for maybe a 1x1 cubemap
  or a known dimension & compression format (like BC1 1 byte per pixel).
2014-11-27 19:52:26 +00:00
baldurk c22a1bb82c Handle invalid UTF-8 bytes without infinite loop 2014-11-27 19:41:17 +00:00
baldurk 3c40d9ab72 Check for functions that might not be present in renderstate apply 2014-11-27 19:37:45 +00:00
baldurk cdf9146a3e Fix typo where scope was fetched twice 2014-11-27 19:33:11 +00:00
baldurk 3efa9378cf Add compile time asserts on number of pnames, add missing pname 2014-11-27 19:30:46 +00:00
baldurk 8b4475c73d Update mesh columns properly, and use correct stage when specified 2014-11-27 19:26:29 +00:00
baldurk 0892989b4b Handle B8G8R8A8 as R8G8B8A8 in pixel history. Refs #110
* We can't create a UAV of format B8G8R8A8, so just make it R8G8B8A8 and
  let the GPU do the swizzle (everything else is exactly the same).
2014-11-27 19:03:25 +00:00
baldurk d585c25633 Slightly expand pixel history column widths
* Should make exponential float values more obvious/visible.
2014-11-27 18:50:51 +00:00
baldurk 237744a6dd Simple implementation of capturing transform feedback
* This won't work if the feedback is started before the captured frame then
  captured inside it, either by being paused or actually active across the
  SwapBuffers call.
2014-11-27 08:29:38 +00:00
baldurk d4bc4e2999 Fix R11G11B10 decode - it's a truncated half format
* ie. not just an unnormalised mantissa plus biased exponent, it has proper
  IEEE style float properties with hidden bit on the mantissa etc. So full
  decoding is necessary, contrary to what some of the docs say :(.
2014-11-27 00:49:05 +00:00
baldurk 16dd0b77f4 Move bound vertex buffers from general state to VAO state 2014-11-25 23:58:04 +00:00
baldurk 11d6ca5956 Fix a few cases that were mistakenly not calling via 'real' funcptrs 2014-11-25 22:40:56 +00:00
baldurk c79fb99434 Implement some missing query/conditional render functions 2014-11-25 22:40:38 +00:00
baldurk 3f33541132 Implement glBindFragDataLocationIndexed and glUniformSubroutines
* Note that the uniform subroutines are saved and restored by the render
  state, but they are not properly restored anywhere where we fetch &
  restore the current program. Will probably need a special helper class
  to push/pop that correctly.
2014-11-25 22:18:24 +00:00
baldurk cbc4c4cc43 Implement missing glMultiDraw functions 2014-11-25 21:43:42 +00:00
baldurk eccde9c8b6 Add glMemoryBarrierByRegion and glTextureBarrier 2014-11-25 21:17:34 +00:00
baldurk 67140ee100 Add glMinSampleShading and renderstate value 2014-11-25 21:17:33 +00:00
baldurk f4851a292a Add integer forms of glTexParameter* 2014-11-25 21:10:54 +00:00
baldurk e9320b1987 Add ARB alias for glDebugMessageInsert 2014-11-25 21:05:34 +00:00
baldurk ee5a81739b "Implement" shader/program binary functions, but don't allow them
* We want the application to pass us real GLSL shaders so we can do all
  kinds of juicy things to them. This is generally indicated by the program
  having a LINK_STATUS of FALSE or similar, and we can pretty much get that
  by just not passing through the call.
2014-11-25 21:03:38 +00:00
baldurk e6b5516776 Implement glFramebfuferParameteri 2014-11-23 19:55:10 +00:00
baldurk 56d500ffdb Implement glDrawRangeElementsBaseVertex 2014-11-23 19:39:10 +00:00
baldurk 403456a82f Add some missing hooked gl state functions
* glClipControl, glProvokingVertex, glPrimitiveRestartIndex,
  glDepthRangeIndexed, glClearDepthf
2014-11-23 19:30:23 +00:00
baldurk bdcde1b3f6 Add 2D multisampled array texture storage functions. 2014-11-23 18:37:50 +00:00
baldurk c1a5fc9a62 Implement glInvalidate* just by marking resource as GPU dirty 2014-11-23 17:06:15 +00:00
baldurk 81c7f985f3 Add glClampColor and glReadnPixels
* glClampColor doesn't have to be serialised as it only affects
  glReadPixels (which aren't serialised).
2014-11-23 16:41:44 +00:00
baldurk 841d77485c Add glActiveShaderProgram and direct glUniform* to right program 2014-11-23 16:37:23 +00:00
baldurk e3bc5bb84b Make sure to specify buffer size large enough for NULL terminator 2014-11-23 15:13:09 +00:00
baldurk 652e875db2 Bugfix - function doesn't take wchar_t* any more! 2014-11-23 15:00:12 +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 6b9287470d Refactor log printing to use new custom printf. 2014-11-23 13:56:28 +00:00
baldurk 9d164826da Implement custom printf function, use it in favour of OS *printf
* Custom printf supports UTF-8 and in fact assumes it implicitly for all
  strings. This means we can use UTF-8 everywhere, even on windows, without
  widening parameters to printf() style functions like RDCLOG et al.
* It also allows me to add size_t support and binary printing.
* Grisu2 is used for converting doubles to strings. Reference:

Paper: http://florian.loitsch.com/publications/dtoa-pldi2010.pdf
impl: https://github.com/floitsch/double-conversion
impl: https://github.com/night-shift/fpconv
impl: https://github.com/miloyip/dtoa-benchmark
2014-11-23 13:56:28 +00:00
baldurk 3abdff49a7 Catch & ignore InvalidOperationException when scrolling
* Fix for a crash report - this exception can be thrown sometimes if the
  window is really small.
2014-11-22 09:50:19 +00:00
baldurk caa5e06644 Fix for crash report - check that event label is non-null 2014-11-22 09:49:36 +00:00
baldurk 54a8554439 Force texture format to typed one for pixel history. 2014-11-21 18:19:18 +00:00
baldurk dea6b64e0b Reference count FrameCapturers. Closes #108 2014-11-18 21:49:29 +00:00
baldurk ea9a81e44f Implement DisplayRendererPreview in renderdoccmd for linux 2014-11-16 23:17:44 +00:00
baldurk 86dc50c4fb Go directly to real glBindFrameBuffer when binding real backbuffer 2014-11-16 23:06:14 +00:00
baldurk 8ef2505e77 Normalise texture target enum when first set
* E.g. this will change GL_TEXTURE_CUBEMAP_FACE_POSITIVE_X to just
  GL_TEXTURE_CUBEMAP. We do it once on set rather than everywhere we expect
  to use the current type.
2014-11-16 21:45:24 +00:00
baldurk 7c3b74131c Make sure all secondary contexts share with replay context 2014-11-16 21:40:35 +00:00
baldurk 8f133984fe Number of mips is GL_TEXTURE_MAX_LEVEL+1 2014-11-16 21:40:20 +00:00
baldurk 5ae3c0fd29 Don't memset to 0 a variable that contains an stl string! 2014-11-16 21:39:33 +00:00
baldurk 9440327dec Default values to GL_FILL in case driver refuses to return any 2014-11-16 21:39:22 +00:00
baldurk 6afe7b7cd1 Speculative change to prevent infinite loop of renderdoccmd.exe
* There was a report of renderdoccmd.exe doing --cap32for64 in an infinite
  loop on itself (each process trying to inject the previous). I'm not sure
  how this could get started, but assuming this was happening automatically
  for 'hook into children', try to break the infinite loop by refusing to
  inject into our own exes.
2014-11-16 16:38:48 +00:00
baldurk 643447f521 Fix for hook fetching/populating on capture and replay 2014-11-16 12:34:55 +00:00
baldurk c7462dc69d With some regret, add hack on AMD to not use VERTEX_BINDING_BUFFER
* AMD drivers (at least on linux, haven't tested windows) don't recognise
  VERTEX_BINDING_BUFFER, so instead we create a dummy VAO with each attrib
  bound to the corresponding buffer and then use
  VERTEX_ATTRIB_ARRAY_BUFFER_BINDING to query the buffer out.
2014-11-16 12:34:33 +00:00