Commit Graph

250 Commits

Author SHA1 Message Date
baldurk 44f46b6ae9 Clamp buffer offset for mesh view input
* If the calculated offset is larger than the buffer size we should be sure to
  clamp it.
2020-04-15 20:33:57 +01:00
baldurk cc64061172 Fix issues with paging in raw buffer viewer 2020-03-16 20:01:47 +00:00
baldurk 4f39279578 When opening a texture in raw buffer viewer, scroll to selected point 2020-03-13 18:00:34 +00:00
baldurk 208a023f12 Fix buffer viewer pagination, allow row offset updates to change page 2020-03-11 18:00:53 +00:00
baldurk ce58f991f0 Apple compile fix 2020-02-25 19:06:58 +00:00
baldurk 4703012a87 Add pagination for very large range buffer viewers 2020-02-25 18:19:52 +00:00
baldurk c23825292d Remove redundant instOffset/vertOffset parameters from DebugVertex() 2020-02-20 19:07:29 +00:00
baldurk 1e8c24fa56 Remove debug print 2020-02-19 11:33:51 +00:00
baldurk 9c091cf791 Fix memory leak in error case 2020-02-13 11:01:44 +00:00
Steve Karolewics dd69f8642a Add APIProperties for debugging and pixel history
Checks to enable debugging and pixel history are gated by the
APIProperties instead of whether the capture is D3D11. Shader
debugging for D3D12 is gated on a config option, which can be enabled
by adding "d3d12ShaderDebugging": "true" to the ConfigSettings
2020-02-12 21:58:33 +00:00
baldurk 661ee35f30 Refactor ShaderDebugTrace to not return a single list of complete states
* The ShaderDebugTrace now only sets up the initial state of an opaque
  ShaderDebugger handle.
* This handle can then be passed to a new function - ContinueDebug - to
  iteratively return N more states. The number of states is implementation
  defined and may be a fixed number or it may run for a fixed time.
* The states themselves no longer contain a complete snapshot of all variables,
  but instead only the changed variables for that iteration. The changes are
  stored as before and after value to make it easier to step forwards and
  backwards (only the ShaderDebugState is needed to move forward or backwards,
  you don't have to search back for the last set value of a variable to 'undo' a
  change).
2020-02-06 17:58:42 +00:00
baldurk 08c0b13aaa Add further checks for windows being deleted during long async callbacks
* This is not really a full solution but fixes the common cases at least.
2020-02-05 15:06:53 +00:00
baldurk 7dd116abd4 Remove redundant/tautological comparisons identified by PVS Studio 2020-01-21 18:28:56 +00:00
baldurk baac06ca93 Remove redundant/dead code identified by PVS Studio 2020-01-21 18:28:56 +00:00
baldurk a5c54b3ce7 Don't pass event ID to PickVertex()
* It's meaningless to try and pick on any other event but the current one
2020-01-20 17:44:34 +00:00
baldurk 210626ae18 When updating postvs position/secondary configs, reset camera properties 2020-01-20 14:32:22 +00:00
baldurk cd3ef3dd55 Fix near/far plane specifiers being backwards 2020-01-20 14:28:59 +00:00
baldurk 4a587da167 Account for byte offset when expanding arrays in bufferviewer formatter 2020-01-17 19:53:38 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 27098f8f70 Give our threads debugger-friendly names 2019-12-19 21:50:13 +00:00
baldurk c82d0f58b9 Rename WASD to Flycam in mesh viewer controls
* This should now work regardless of keyboard layout, e.g. on AZERTY the same
  physical keys will still work. We also add arrow keys as a backup
2019-12-13 16:37:14 +00:00
baldurk 24e4f4179f Fix projection guessing controls sometimes being enabled when unused 2019-12-13 16:36:44 +00:00
baldurk f514815e3c Update buffer formatter help text, save its visibility in config 2019-11-29 13:53:45 +00:00
baldurk e205054317 Add UI support for GPU typed pointers in buffers 2019-11-29 13:53:44 +00:00
baldurk b3979262a5 Replace FormatElement with ShaderConstant/ShaderVariableType
* FormatElement is now a static BufferFormatter class to help generate and parse
  buffer formatting strings
2019-11-29 13:53:44 +00:00
baldurk 324b96c977 Remove FormatElement::byteSize(), move to ResourceFormat 2019-11-29 13:53:44 +00:00
baldurk 00170e2ec3 Make GetVariants a free function taking interpreting format directly
* We also store the format in BufferElementProperties for the buffer viewer
  since we'll later remove the ResourceFormat stored in FormatElement
2019-11-29 13:53:44 +00:00
baldurk f046423664 Split buffer-centric properties out of FormatElement 2019-11-29 13:53:44 +00:00
baldurk db563bb0bf Refactor public interface around handling of textures
* Subresource handling is more consistent - we pass around a struct now that
  contains the array slice, mip level, and sample. We remove the concept of
  'MSAA textures count samples as extra slices within the real slices' and
  internalise that completely. This also means we have a consistent set
  everywhere that we need to refer to a subresource.
* Functions that used to be in the ReplayOutput and use a couple of implicit
  parameters from the texture viewer configuration are now in the
  ReplayController and take them explicitly. This includes GetMinMax,
  GetHistogram, and PickPixel.
* Since these functions aren't ReplayOutput relative, if you want to decode the
  custom shader texture or the overlay texture you need to pass that ID
  directly.
2019-11-26 17:38:25 +00:00
baldurk 6201183504 Fix broken buffer viewer UI protection 2019-11-15 18:33:17 +00:00
baldurk 07e8731776 Protect against buffer view being closed during async render thread work 2019-11-13 17:25:01 +00:00
baldurk a08455c4fb Don't crash if vertex buffer stride is 0 when picking vertices 2019-10-23 11:23:32 +01:00
baldurk 03ddc61779 Support rich resource text in buffer viewer 2019-10-15 15:05:38 +01:00
baldurk d48b84d8f5 Pass buffer length to format string parse, for better default format
* If we are only looking at a 4-byte buffer, don't use a uint4 default or it
  will fail to display anything
2019-10-15 10:54:42 +01:00
baldurk 54291b0e29 Fix linux compilation (again) 2019-09-07 12:06:05 +01:00
baldurk 7fe044faaf Fix display of 64-bit integers in buffer viewer 2019-09-07 09:24:46 +01:00
baldurk 07158ad24c Fix support for triangle fans on GL/Vulkan 2019-08-20 15:33:12 +01:00
baldurk 61de35bfc6 Pass through primitive restart state when rendering meshes 2019-08-12 17:53:22 +01:00
Tillmann Karras 622c8bdb0e BufferViewer: fix 2/4-byte primitive restart 2019-07-24 11:24:09 +01:00
Tillmann Karras f61a5e464c BufferViewer: never leave indices uninitialized 2019-07-24 11:24:09 +01:00
baldurk e525630a17 Add special resource type for A8_UNORM. Closes #1426
* While it's redundant this format is still valid in D3D so needs to be handled
  correctly.
2019-06-25 19:08:07 +01:00
baldurk 70007d0794 Don't consider interim position builtins to be projected/rasterized
* Even if the VS outputs to the position builtin, if there's a tessellation or
  geometry shader consuming it that doesn't mean much.
2019-06-05 17:57:28 +01:00
baldurk 69e4be52cf Display bounding box data in mesh view camera panel
* This isn't the best place for it but it makes the most sense for now.
2019-05-22 13:57:23 +01:00
baldurk 074070b1cf Only unproject position attributes that output a position. Closes #1363
* If we select a UV attribute to draw as position we don't want to unproject it
  for display, just treat it as we do any normal attribute.
2019-05-22 13:38:20 +01:00
baldurk 467dd5e808 Fix calculation of bounding boxes for non-4 component attributes
* If we only have 3 or 2 components, set the remaining bounding box values to 0
  so they aren't set at +/- FLT_MAX.
2019-05-22 12:40:56 +01:00
baldurk dd77b8a2b6 Fix order-of-operations, update position/secondary columns first
* We need to have the correct position and secondary columns before updating the
  mesh configuration that references them.
2019-05-22 12:40:19 +01:00
baldurk e48065c96b Replace use of std::pair with rdcpair wherever possible
* Only remaining uses in our code is when we're interacting with std::map where
  it uses std::pair internally
2019-05-17 16:32:56 +01:00
baldurk 2320bb5391 Pass the right MeshDataStage to HasAlignedPostVSData() 2019-04-12 16:51:35 +01:00
baldurk 2ddf3b7adf Auto-fit the WASD camera to the bounding box after switching
* We do the same for the arcball, there's no reason the flycam should default to
  the origin for vertex inputs
2019-04-09 11:09:22 +01:00
baldurk db89f50a30 Rename Mesh Output panel to Mesh Viewer, since it displays inputs too 2019-03-08 15:40:11 +00:00