41 Commits

Author SHA1 Message Date
baldurk ce20926f20 Try and be defensive about lack of index data
* ArgumentException thrown from BlockCopy seen in a crash upload, and
  it might be because of an empty or null buffer returned, maybe.
2015-02-12 21:36:46 +00:00
baldurk 8938c71853 Texture buffers now default to viewing in the buffer not texture viewer
* The pipeline state windows will open up the buffer viewer instead of
  the texture viewer to show the contents of texture buffers.
2015-02-12 21:15:02 +00:00
baldurk 3f5d87f290 Make generic values show up in the mesh viewer 2015-02-10 17:16:32 +00:00
baldurk 1b4bf97574 Fix for instance rates not being accounted for on vertex inputs 2015-01-28 02:23:30 +00:00
baldurk 6d64fc7a1a Handle NULL index buffer being bound for indexed draws better 2015-01-28 02:23:17 +00:00
baldurk a703dc54d0 Fix instancing support for post-vs mesh views on D3D11 and GL
* We stream-out or transform feedback the whole instanced draw at once,
  producing a buffer containing all N instances in one. Then when the
  client requests postvs data, an offset into the buffer is calculated
  (in 1/N chunks) and carried through everywhere.
* Since we were using the offset to indicate where the system position
  output lay for since-last-clear auto drawing of meshes, we rearrange
  the output attribute order so system position is always first in the
  list.
* Also since-last-clear now doesn't include the current event, but does
  include any previous instances before the current instance.
2015-01-28 02:21:14 +00:00
baldurk d7c8c1026c Support XFB from geometry or tessellation shaders
* Also set default near/far planes for auto-calculation to 0.1/100
2015-01-26 19:09:39 +00:00
baldurk 184d3a6789 Prime post-vs data when log is loaded (or bufferviewer is newly opened)
* This fixes the bug that's been around for a while, where if you have
  an event selected and then open the buffer viewer, it won't have the
  post vs data available until you re-select that event.
2015-01-26 14:27:16 +00:00
baldurk 9bd5fabe1a Implement axis markers and frustum helper on GL mesh view 2015-01-25 21:11:56 +00:00
baldurk da2470dbcf Use correct stride value 2015-01-25 17:16:57 +00:00
baldurk 44f498de0d Fixes to ensure postvs data is available & properly used 2015-01-25 16:59:42 +00:00
baldurk 22c9775008 Refactor RenderMesh() to now purely render what's specified
* So RenderMesh doesn't pick up anything implicitly from the current
  event, log, pipeline state etc - everything it needs is explicitly
  provided by the config parameters (note this might include a buffer
  generated by postvs data fetching, but the implementation now doesn't
  need to care or treat it as a special case.
2015-01-25 14:04:41 +00:00
baldurk 92e830b801 Return Post VS mesh data just with buffer ID & description
* This will allow shifting to RenderMesh being run locally just by
  the UI specifying the buffer and simple vertex specification, rather
  than by relying on any local log properties (or replaying the log).
* The reasoning behind this change is that it becomes much simpler to
  implement, rather than having to modify the draw to do what we want,
  we just do an entirely custom draw based on a few properties - similar
  to the texture rendering. This will help e.g. for writing a GL
  implementation.
* The second benefit is that we can just transfer the buffer contents
  across the network when replaying remotely, so mesh rendering can be
  implemented even for remote replay - the last unimplemented feature.
* It could also be used similar to the image viewer in future, to
  display mesh files.
2015-01-24 22:06:45 +00:00
baldurk f459c63380 Show restart index on GL pipe state, and handle it being disabled 2015-01-15 23:37:17 +00:00
baldurk f013f6fd29 Store index format and topology in drawcall, to accommodate GL
* D3D11 just latches the state from the input assembler state into the
  drawcall when it's being added. GL stores the state per-draw.
2015-01-15 17:17:12 +00:00
baldurk 6de7644e68 Don't bail out quite so quickly if vertex buffers are insufficient
* This allows 'partial' rows in the mesh viewer, if a vertex input element
  references invalid/out of bounds data, but the others are fine (coming
  from different streams).
2015-01-09 00:48:18 +00:00
baldurk 0df6e36ff5 Allow displaying any semantics as 'position' on mesh output view
* This means you can visualise the UVs directly, not just as a colour
  on the regular mesh.
2014-12-20 19:54:52 +00:00
baldurk 69562fb82d Handle invalid index type reasonably gracefully 2014-12-02 00:16:29 +00:00
baldurk 49b2b2d2df Handle empty indices array without crashing 2014-12-01 13:14:43 +00:00
baldurk 8b4475c73d Update mesh columns properly, and use correct stage when specified 2014-11-27 19:26:29 +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 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 ed1b03fe68 Hide highlight verts button when not in mesh view 2014-10-08 22:08:55 +01:00
baldurk 333ade7201 Handle drawcalls of 0 indices/vertices without crashing. 2014-10-08 22:07:59 +01:00
baldurk e8f25d4067 Make sure menu-strip export comes from selected buffer view. Refs #92 2014-10-07 00:11:10 +01:00
baldurk 3b8e4a3323 [Refs #87: Static Analysis] Fix incorrectly unused variables/returns 2014-10-05 19:01:28 +01:00
baldurk f198e71806 [Refs #87: Static Analysis] Remove unused variables 2014-10-05 19:01:27 +01:00
baldurk 8b0f05ca5e [Refs #87: Static Analysis] Clarify timer member by explicit use 2014-10-05 19:01:26 +01:00
baldurk e749f42876 [Refs #87: Static Analysis] string compare as uppercase or by length 2014-10-05 19:01:25 +01:00
baldurk 60d5a425aa Add option to disable/enable vertex highlighting in mesh view 2014-09-28 16:31:49 +01:00
baldurk faeb047211 Handle vtx highlights outside UI, for complex topologies. Refs #85 2014-09-28 02:24:57 +01:00
baldurk 7da04de998 Stream-out as point list for vs-out draws to get vertex reuse
* For vertex shader output only, we do the streamout as a point list and
  render each vertex once then we can reuse the same(ish) index buffer and
  topology as the original draw.
* For GS/DS out there will likely be some expansion of verts so we do the
  same as we used to.
2014-09-27 21:41:35 +01:00
baldurk 0261095de6 Add selection of primitive to pixel debug from pixel history
* This means when multiple fragments are writing to a pixel you can choose
  precisely the one you want to debug, rather than the debugging always
  running the approximately last fragment to pass
2014-09-25 10:49:01 +01:00
baldurk f4de6993bc Fix double support in FormatElement & custom Buffer/CBuffer views 2014-09-17 18:51:00 +01:00
baldurk bda68c8ba6 CBuffer window is a dialog now, with ability to set custom layout 2014-09-13 18:48:39 +01:00
baldurk 543165cece Give the shader viewer a better disambiguating title when debugging 2014-09-06 11:45:51 +01:00
baldurk ca043bf3e2 Add ability to view buffer elements as hex with xint/xshort/xbyte 2014-07-25 08:58:49 +01:00
baldurk 74a0330271 Ensure C# UI uses consistent culture on all threads. Closes #72
* This means that e.g. decimal separator will always be . and similar
  effects, which avoids the need to have culture specific formatting or
  special-case handling around CSV export etc.
2014-07-23 08:36:05 +01:00
baldurk d678d847d7 Add support for arrays in the buffer viewer. Closes #56
For now this just acts like a really wide vector with N columns for the
array, but this could be improved in future if a better visualisation is
decided on.
2014-05-13 21:53:59 +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