Commit Graph

170 Commits

Author SHA1 Message Date
baldurk 3bb382d9cf Further progress on pixel history view
* Added simple UI
* Don't apply SRGB curve to alpha data
* Account for clear calls not returning occlusion query results, and for
  depth/colour clears.
2014-07-13 18:58:45 +01:00
baldurk 8ef17e41e1 Allow specifying a background colour per-column on a TreeListNode 2014-07-13 18:57:39 +01:00
baldurk 4ff1355a10 Add D3D11 driver side call to fetch drawcall by event ID 2014-07-13 18:57:38 +01:00
baldurk 53afb34e71 For each matching event determine which tests it fails (if any). 2014-07-13 18:57:34 +01:00
baldurk cbcfc135b3 Interpret/convert pixel values as appropriate to fully expanded form 2014-07-13 18:57:20 +01:00
baldurk 93ac535dd0 Check whether tests are on/off and detect trivial test failures 2014-07-13 18:57:19 +01:00
baldurk 726eed3d29 Create a texture to store before/after values as we go along
* In the case where blending is disabled this gives us the passing shader
  output value (when blending is enabled we need to get the in between
  fragments, if any.
2014-07-13 18:57:18 +01:00
baldurk d832e33b0c First pass of pixel history impl (not complete)
* Uses occlusion queries to determine which events touch a given pixel
  (by replaying with all tests disabled except scissor, and scissoring to
  the pixel).
2014-07-13 18:56:54 +01:00
baldurk 4e51aab9e5 Add externally visible API to query for pixel history 2014-07-13 18:56:45 +01:00
baldurk 25c4771589 Add drawcall flags for clearcolour/cleardepth 2014-07-13 18:55:04 +01:00
baldurk 85a4a8cccd Add uint8_t -> float SRGB conversion function (using LUT) 2014-07-13 18:55:03 +01:00
baldurk d83adf351b Protect against the case of setting UAVStartSlot=0, NumUAVs=0
* Caused the render state tracking to get confused (as UAVStartSlot is
  used to determine the number of RTVs) and led to weird inconsistent
  states being restored. Most obviously led to RTs not being set when
  they should have been on replaying and drawcalls going missing.
2014-07-13 15:14:32 +01:00
baldurk ecfa6dbe7b Don't misidentify RTs as UAVs if UAVStartSlot is mis-set to 0 2014-07-13 15:14:27 +01:00
baldurk 6cb65e8569 Handle SemanticName being NULL in D3D11_SO_DECLARATION_ENTRY
* NULL specifies that a gap should be made/skipped in the output data.
* This would crash before but now serialises NULL as "" since that's an
  invalid SemanticName (must be NULL or name a semantic). This will still
  read old logs fine but old programs will not do the right thing on new
  logs.
2014-07-05 12:49:14 +01:00
baldurk 344d927c03 Skip geometry shader streams > 0 for now. Referencing #27 2014-07-05 12:47:14 +01:00
baldurk c274169de3 Implement indexable temps in shader debugging.
* These often come up when you have an inline array that are dynamically
  indexed into (e.g. an array of offsets in a poisson disk used in a loop
  that isn't unrolled).
2014-07-04 22:52:04 +01:00
baldurk 7799f107f8 Can only have up to 2 double components in a vector 2014-07-04 22:51:05 +01:00
baldurk 8d73d24cab Handle matrices having each row/column padded out. Closes #69 2014-07-04 21:15:31 +01:00
baldurk 75353bd190 Add toggle to disable gamma 'correction' of linear data. Closes #58
* The explanation is in the FAQ but the short explanation is that most
  data e.g. normal maps are conventionally displayed as if they contained
  SRGB data, so RenderDoc does the same so things look as expected.
2014-07-04 17:02:11 +01:00
baldurk 0fbdcbc83c If a constant buffer is unused, open raw buffer viewer. Closes #60 2014-07-01 00:52:18 +01:00
baldurk 443ad1e967 Allow choosing background display even for no alpha. Closes #69
* Defaults to black, legacy behaviour. Colour (or checkerboard) is saved
  in persist data for texture viewer between sessions.
2014-07-01 00:37:23 +01:00
baldurk 185bbea851 Clamp picked pixel co-ords to texture size. Closes #68
* "Hover" co-ords still show larger values, in []s.
2014-07-01 00:02:57 +01:00
baldurk 662be4e657 Merge pull request #71 from Kamayuq/master
Added bit visualization to the Debugger
2014-06-28 15:22:51 +01:00
Arne Schober 5d73a581a3 Added bit visualization to the Debugger 2014-06-28 16:16:31 +02:00
baldurk 927847325e Try and track cases of duplicate/bad wrappers by returning error
* Print out the type via guid - if we can track which resources are
  creating duplicates we can pass the error further back to the Create*
  function so we can dump descriptor etc.
2014-06-28 12:53:24 +01:00
baldurk 33049558c5 Bail out if the wrapper isn't valid, otherwise erase() will crash 2014-06-28 12:52:43 +01:00
baldurk 711f4aadf6 Print error first for unsupported operand, and check name is valid
* Got a crash report here but from the minidump can't see what's wrong.
  It was debugging a compute shader which shouldn't have outputs.
2014-06-28 12:52:16 +01:00
baldurk f0576ae431 Rename GL context to ctx to match linux 2014-06-28 12:50:19 +01:00
Baldur Karlsson 29792558e1 call Serialise_ functions, not real functions 2014-06-27 14:39:41 +01:00
Baldur Karlsson fb7181e41e Don't waste time making redundant copy of textures array 2014-06-27 14:39:40 +01:00
Baldur Karlsson 5e32950195 Change GLResource tuple to be three components including Context
* This lets us distinguish framebuffer object 1 on context A from
  FBO 1 on context B.
* At the moment we assume that all shareable objects are shared between
  all contexts. I think this is sensible and fairly common, but it will
  break if some contexts don't share as the objects will alias.
2014-06-27 13:24:19 +01:00
Baldur Karlsson 5cb6edffb8 For VAOs, track and deduplicate redundant chunks
* This is really a spot optimisation but I have a feeling it might be
  useful for more programs.
* If a program uses a single VAO and updates the attrib pointers/enables
  and disables them, then this will prevent an unbounded number of chunks
  building up pointlessly while READING and pushing into the record.
* A 'better' fix for this would be to gather pointer/enabled state as
  initial contents and not tracking any of this except for in CAPFRAME,
  but that isn't happening at the moment.
2014-06-27 13:13:46 +01:00
Baldur Karlsson e5664a0838 Add global lock on all GL hook entry points
* This could be improved and moved further down, not all functions would
  need a lock (only things modifying shared resources), but it suffices
  for now.
2014-06-27 13:06:59 +01:00
Baldur Karlsson 8d44497712 Simple tracking of active context per thread
* Should change this to TLS
2014-06-27 13:02:12 +01:00
Baldur Karlsson 740a6c80e9 Fetch initial buffer contents for dirty resources in GL
* Huge hack, but it works for now...
2014-06-27 12:36:44 +01:00
Baldur Karlsson de9fb483f0 Also pass-through glXChooseFBConfig (for SDL contexts > 3.0) 2014-06-27 11:59:01 +01:00
Baldur Karlsson c13a230e3e typo - use TextureRes for textures 2014-06-26 17:01:38 +01:00
Baldur Karlsson b30314e644 fixes for hooking programs that use SDL
* Pass-through a few functions in glXGetProcAddress
* Hook dlopen() and redirect any attempts to open libGL.so
2014-06-26 15:19:20 +01:00
Baldur Karlsson b21c0e62ba Update qt creator file list 2014-06-26 15:17:38 +01:00
Baldur Karlsson b9dd24e950 Also export glXGetProcAddressARB() 2014-06-26 11:42:30 +01:00
Baldur Karlsson f00815818a Include stddef.h for size_t 2014-06-26 11:42:08 +01:00
Baldur Karlsson efa520474a Minor optimisation to reduce recording of redundant chunks 2014-06-25 09:23:19 +01:00
Baldur Karlsson 4bb512a174 Support half-float in GetByteSize 2014-06-25 09:22:32 +01:00
Baldur Karlsson 052694d39f Track enabled caps in the renderstate only when not capframing 2014-06-25 09:22:15 +01:00
Baldur Karlsson dcf243ad63 Quick optimisation - detect case of glBufferData just to orphan 2014-06-24 16:00:29 +01:00
Baldur Karlsson 47ed54fa91 When capturing frame, track VAO modifications in context record 2014-06-24 16:00:28 +01:00
Baldur Karlsson b3ac0619ba Improve glMap() handling, handle non-invalidate case etc. 2014-06-24 16:00:28 +01:00
Baldur Karlsson aae6208b22 Account for UNPACK_ROW_LENGTH and UNPACK_IMAGE_HEIGHT 2014-06-24 16:00:27 +01:00
Baldur Karlsson 038bcff106 GL_TEXTURE_SWIZZLE_RGBA is 4 parameters not 1 2014-06-24 16:00:26 +01:00
Baldur Karlsson a10770defb Handle setting datatype on records/texture data correctly 2014-06-24 16:00:26 +01:00