Commit Graph

683 Commits

Author SHA1 Message Date
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
baldurk bb4cbdf097 Check for version > 4.4 or GL_ARB_enhanced_layouts 2014-11-16 12:24:40 +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 aaf525d254 Respect the maximum number of bindings for indexed buffer binds 2014-11-16 12:22:47 +00:00
baldurk 9ce6c242b2 Only set GL_DEPTH_STENCIL_TEXTURE_MODE if it has a valid value 2014-11-16 12:22:02 +00:00
baldurk 3c95803566 # mips should be calculated as GL_TEXTURE_MAX_LEVEL + 1 2014-11-16 12:18:34 +00:00
baldurk c5f383bc65 Use sanitised texture target 2014-11-16 12:17:59 +00:00
baldurk 250570d90c Add function to go from binding or cube face to texture target 2014-11-16 12:15:47 +00:00
baldurk 201a25f459 Use correct serialised target enum for replay-side 2014-11-16 12:15:01 +00:00
baldurk 4a34f5961b GLSL compile fix, compare dot() result against scalar 2014-11-16 12:14:19 +00:00
baldurk 04b108efa0 Fix typo in serialise of glTexBuffer* 2014-11-15 14:34:28 +00:00
baldurk c44fca55a3 Suppress performance GL debug messages by default 2014-11-15 14:24:43 +00:00
baldurk b00cffddbd return GL_*_INTEGER base format for unnormalised integer types 2014-11-15 14:21:02 +00:00
baldurk c6378619d8 When a texture is bound to a framebuffer, consider it dirty 2014-11-15 14:04:14 +00:00
baldurk 5be7a4eef3 Save texture state parameters with initial state
* If the user code calls glTexParameter many times (defined as > 12) then
  we treat that texture as dirty and stop saving those chunks.
2014-11-15 14:01:02 +00:00
baldurk 5acc53bae0 Add EXT_DSA glGetTextureParameter functions 2014-11-15 13:58:52 +00:00
baldurk 65df5a9192 Check file hasn't been removed out from under us before saving 2014-11-15 12:21:27 +00:00
baldurk 5b2a754196 Serialise a few more state change functions 2014-11-15 12:03:16 +00:00
baldurk b41b5e1f9a Handling for old style unsized texture internal formats 2014-11-15 11:03:08 +00:00
baldurk 0b888f2609 Serialise out whether data is provided to glTexImage* functions 2014-11-15 10:41:28 +00:00
baldurk 92d77e32b3 Add missing \s 2014-11-15 00:33:11 +00:00
baldurk 29b4c65162 Work around issue where application 'exports' gl symbols
* This is a bit complex. If an application has a global symbol e.g.
  GLENABLE glEnable; as their function pointers that they fill out from
  glXGetProcAddress, then OUR glEnable global function gets replaced with
  that symbol. It's weird. But it means crashes if we try and return the
  address of that symbol as a function pointer.
* However it's also possible to get the reverse problem - if an application
  has a shared library that has those symbols expecting them to be function
  pointers, those symbols will get overridden with our global functions
  and it will mean an instant crash when they try to assign to those func
  ptrs.
* I'm not sure if there is an ideal fix to this Catch-22, as we also need
  to export these bare functions in case someone just plain links against
  libGL and expects them to be there, with no GetProcAddress/dlsym funny
  business.
2014-11-15 00:13:44 +00:00
baldurk 0f34fbd29a Check that for each new context we populate hooks to get func ptrs 2014-11-14 23:26:18 +00:00
baldurk c5e53f7473 pick up libGL dlsym handle when dlopen() is called 2014-11-14 23:25:15 +00:00
baldurk 9c0b89baae StringFormat::Fmt was re-using va-list incorrectly on linux 2014-11-14 23:22:50 +00:00
baldurk fd9d11bc6d Fix linux GetEmbeddedResource not using address of file start/end 2014-11-14 23:22:36 +00:00
baldurk ac89399c60 linux compile fixes 2014-11-14 14:16:05 +00:00
baldurk ecbd919d05 Try to preserve horizontal scroll between events on mesh view 2014-11-13 22:21:09 +00:00
baldurk 551b0372c8 Allow fully flexible display of position&other component on meshes
* You can choose which component will be used as 'position' when rendering
  vertex inputs. Helpful if a position component isn't auto-detected, or
  if you want to render UV co-ordinates onto the screen.
* Instead of fixed TEXCOORD0/Color options for solid shading onto the mesh
  you can choose a secondary column yourself.
* Also the solid shading options are available on vertex output meshes as
  well as inputs.
2014-11-13 18:37:58 +00:00
baldurk ef65ad65f1 Fix highlighting VS output verts with index buffers 2014-11-13 18:24:08 +00:00
baldurk 5abeee554f Generate generic input layout from correct VS bytecode 2014-11-13 13:49:13 +00:00
baldurk b255f5bc36 Protect against ArgumentException in Timeline Bar paint
* Crash report was submitted indicating a crash here, which is either
  memory issues or momentarily crazy-large window. We can catch the
  exception and just clear to black.
2014-11-12 23:38:40 +00:00
baldurk f59ae15ad3 Defensively code against queries failing to create.
* Received a crash report that indicated some queries failed to create,
  which means uninitialised pointers would be used from then on (= boom).
2014-11-12 23:30:48 +00:00
baldurk e4684baf20 Handle fetching DX11.2 interfaces, but just as passthru. Closes #106
* Until I have a sample that uses it, I'm not going to attempt to serialise
  the tiled resource API. It has a lot of other potential knock-ons too
  (e.g. to initial contents).
2014-11-12 23:28:19 +00:00
baldurk 65cee274eb Wrap/handle as appropriate new DXGI 1.2 & 1.3 ifaces. Refs #104 2014-11-12 22:55:58 +00:00
baldurk c273073935 Proper record deletion and record parenting 2014-11-12 00:48:56 +00:00
baldurk d46b1bfdd0 glCopyImageSubData just marks destination texture as dirty 2014-11-12 00:48:24 +00:00
baldurk f7c07577a0 Only serialise glBindImageTexture(s) when in WRITING_CAPFRAME 2014-11-12 00:48:00 +00:00
baldurk ca03304adb Handle special formats like GL_LUMINANCE8_EXT separately 2014-11-12 00:47:38 +00:00