Commit Graph

64 Commits

Author SHA1 Message Date
baldurk 8eddd387d7 Add vulkan pipeline state viewer based on D3D11 viewer 2016-02-07 18:41:35 +01:00
baldurk 8b7a025853 Refactor BGRA formats to not be special (so allow any BGRA format)
* Also add ASTC and D16S8 types while in the neighbourhood
2015-11-29 22:05:26 +01:00
baldurk 00ba48ef4c default to VS IN as primary, instead of just bailing 2015-11-18 22:30:46 +01:00
baldurk e441bff833 Display NaNs correctly in buffer viewer cells 2015-11-18 22:28:47 +01:00
baldurk 10c461d7d3 In mesh viewer, vertex picking and enabling sync will sync up the views 2015-11-12 09:40:41 +01:00
baldurk 1b99bb3dfc Add warning and clip display if a buffer will be too large
* E.g. if a huge buffer is displayed as just floats, there could be
  100s of millions of rows. Instead, we clip to 200,000 (anecdotally
  where things start getting a bit laggy on the control), and allow
  advancing through sections of the buffer at a time.
2015-10-10 10:56:53 +02:00
baldurk d16a8024d5 Make sure we have some fallback for locating position element. Refs #149
* If no position element is selected at all that's really confusing, so
  worst case we just pick the first attribute.
* Making it intuitive/obvious that you can change which attribute is
  displayed as mesh - that's a different problem.
2015-09-12 17:30:35 +02:00
baldurk 726a937312 Check against gridview being disposed (from crash report) 2015-08-24 20:06:01 +02:00
baldurk 2967a8a5ce Catch overflow exception handling bounding box 2015-07-24 00:16:45 +02:00
baldurk 43bc6f836f Tidy up which controls can be used at which stage (tess on or off) 2015-07-15 21:37:59 +02:00
baldurk e40ab9261a Handle edge-case where input layout bytecode doesn't use every element 2015-07-14 21:53:36 +02:00
baldurk f6527107dc Add try {} catch to handle exceptions thrown from IO operations 2015-07-07 19:06:31 +02:00
baldurk 4c988e9e3a Better arcball controls in the mesh viewer
* Tweaked flycam a bit too, but not much.
* Refactored the API/C# side camera classes to avoid exposing a ton of
  stuff just to do relative rotations in the arcball via quaternions.
2015-07-07 15:38:00 +02:00
baldurk 4444da212d Handle bounding boxes of 1 and 2 component types properly 2015-07-07 10:17:58 +02:00
baldurk dd9aff3890 Implement right click to pick vertices in the mesh viewer. Refs #139 2015-07-07 10:02:36 +02:00
baldurk edda31248f Render bounding box around mesh, centre & scale arcball on bbox
* The arcball lookat position can also be dragged with alt-click or
  middle click.
* Also supports other elements as position not just magically-selected
  "POSITION" element.
2015-07-06 19:58:45 +02:00
baldurk b23db183b6 Bugfix for raw buffer data not being properly filled out in mesh view 2015-07-06 19:46:59 +02:00
baldurk 63824680ea GS output never uses an index buffer (so mesh preview wasn't rendering) 2015-04-25 13:48:57 +02:00
baldurk e35fc400dd Make sure to handle debugging 'invalid' indices
* Crash upload fix
* If a vertex is the strip restart index (displayed as "-1") or is
  reading out of bounds of the index buffer (displayed as "-") then we
  should still allow vertex debugging to go ahead, as if the index were
  just 0.
2015-04-21 21:00:51 +02:00
baldurk 95f4011bcb Add option to favour monospaced font for all data. Refs #118
* The option will enable monospaced fonts for all data displays, like
  the list of events, API calls, etc as well as pipeline displays, entry
  of filename/directory in the capture window and many other places.
  Pure UI labelling etc mostly still stays as a serif font.
* A few sizes of controls were tweaked (like headers in the pipeline
  windows) so that they didn't just barely overflow with the larger
  font.
* While looking at this, it became obvious that buffer viewers and
  constant bufferviewers should always display in monospaced regardless,
  so that has been changed.
2015-04-09 21:49:03 +01:00
baldurk 1f9918a7c8 Fix some crashes and bad handling of indices
* If buffer wasn't a multiple of 4, a Buffer.BlockCopy call could crash
* Unsigned byte indices (for GL) weren't supported
* Post-transform index buffer was assumed to just be uints, but in fact
  it is the same size as the drawcall's existing indices.
2015-03-20 20:52:31 +00:00
baldurk e7307455f6 Fix a crash if vertex input is instanced, with instance rate of 0
* In this case, every input takes the first index, need to avoid divide
  by 0 error.
2015-03-11 08:04:19 +00:00
baldurk c3e381a76a Remap entire index buffer for post-vs data, instead of just shifting
* Previously for post VS data we could maintain the index buffer by just
  doing the stream-out/transform feedback for a point list with each
  unique index. To maintain the index buffer we padded out any gaps in
  the indices with a single value, so that we could just shift the
  indices. This causes severe problems though if the indices start at 0
  and contain an invalid value like 0xcccccccc - we'd allocate a huge
  array and perform a massively wasteful streamout.
* Instead, we just stream out on the tightly packed list of unique
  indices, then remap each 'real' index to where it is in the tightly
  packed output buffer.
2015-03-10 21:05:59 +00:00
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