336 Commits

Author SHA1 Message Date
baldurk ceb2e81ab2 Revert "Export correct range for binary dumps as well."
This reverts commit 7bad9214a8.
2022-09-15 13:26:15 +01:00
Hans-Kristian Arntzen 7bad9214a8 Export correct range for binary dumps as well. 2022-08-29 19:42:41 +01:00
Hans-Kristian Arntzen 033bcb2a11 Export correct CSV range and fixup element counts. 2022-08-29 19:42:41 +01:00
Shahbaz Youssefi ed4c3756d0 Enable primitive restart for list topologies
This is supported by OpenGL, and on Vulkan with
VK_EXT_primitive_topology_list_restart.  On Vulkan, all drivers are
known to support this even without
VK_EXT_primitive_topology_list_restart.  On D3D, primitive restart is
only supported for strip topologies.

Previously, RenderDoc specifically disabled primitive restart for
non-strip topologies.  In this change, that is no longer done.  If the
app enables primitive restart, so will RenderDoc behave accordingly.  It
would be the responsibility of the app to avoid primitive restart if the
API doesn't allow it.
2022-08-29 14:59:14 +01:00
baldurk fbd0f3ee15 Ensure that fixed data over 10k bytes is fetched in buffer viewer
* We need to calculate the fixed data length properly even when there is no
  repeated data, so that pagination doesn't kick in on the data that is needed
  for the fixed region.
2022-08-18 15:54:45 +01:00
baldurk 65581ca322 Subtract per-draw index byte offset from index buffer size 2022-08-01 20:40:03 +01:00
baldurk a33eb5fcb1 Allow reinterpreting formats of constant blocks that have bytes backing
* Even without a true buffer, as long as we have access to the bag of bytes and
  a non-opaque layout we can allow reinterpreting.
2022-07-25 10:08:59 +01:00
baldurk 5d51b524c6 Fix interpreting and declaring buffer formats that include pointers 2022-07-25 10:08:59 +01:00
baldurk c3a6a8a9d6 If there's no fixed data don't fetch the whole buffer 2022-07-14 14:01:08 +01:00
baldurk 7bdf26d329 Implement location tracking and goto for GS printfs
* We can't debug geometry shaders but we can scroll to them, as long as we have
  the primitive. We can't differentiate instances currently without passing that
  data through from the VS (and through tessellation, if it exists).
* This also disables the debug and goto buttons for printfs from shader stages
  that don't support those operations.
2022-07-11 13:02:23 +01:00
baldurk e50e114cb7 Show error/unavailable status for postvs data in mesh view. Refs #2595 2022-06-06 18:35:29 +01:00
baldurk ba5f806ba1 Set constant buffer generated format as the auto format 2022-05-27 10:43:55 +01:00
baldurk c77261f0f3 Display struct/enum typenames when available in buffer viewer 2022-05-25 17:18:31 +01:00
baldurk d44d9e4857 Show bitpacking in offset column in buffer viewer 2022-05-25 17:02:27 +01:00
baldurk 9bde5324b6 Improve handling of enums in buffer viewer fixed variables 2022-05-25 17:02:10 +01:00
baldurk 397088a813 Remove some cbuffer considerations for regular buffer views 2022-05-23 16:33:21 +01:00
baldurk c5a588d2e4 Fix texture-as-buffer view format string generation 2022-05-23 14:43:08 +01:00
baldurk 31feedd16d Remove ShaderConstantDescriptor, inline into ShaderConstantType
* This struct was redundant isnce it was only ever used in the type and not
  meaningfully accessed directly.
2022-05-20 14:15:31 +01:00
baldurk 2d8687e28e Show parse errors on the line they occur 2022-05-20 14:15:31 +01:00
baldurk abe645f031 Add support for saving and loading structure definitions 2022-05-20 14:15:30 +01:00
baldurk 4bb54d00dd Show visible offsets and (optionally) padding in buffers. Closes #1664 2022-05-20 14:15:30 +01:00
baldurk 43fa3cd94b Use BufferViewer for viewing constant buffers
* Unifying these views means that constant buffers have all the same
  reformatting and it avoids having multiple paths for what is now effectively
  the same control (a buffer can either have fixed data, repeating data, or
  both)
2022-05-20 14:15:30 +01:00
baldurk fcdcc9714b Implement export options for fixed items in buffer view 2022-05-20 13:37:27 +01:00
baldurk a36516c8a5 Explicitly handle unbounded arrays and display declared fixed vars
* GL and Vulkan allow buffers to have fixed variables before a trailing AoS
  unbounded array. These fixed variables can't be easily displayed in a table
  and previously we skipped them. Now we display these in a tree format.
* We also support formats which don't have an unbounded array at all and display
  these just with the tree. This will allow the BufferViewer to subsume the
  capabilities of the ConstantBufferPreviewer (though it needs to handle opaque
  non-buffer-backed variables, and slot-following).
2022-05-20 13:37:26 +01:00
baldurk ac886728ca Don't use docking UI for raw buffer viewer mode 2022-05-20 13:37:26 +01:00
baldurk 97a3943cdd Use packing rules when generating format strings for structs
* This allows the calling code to pass a hint of what packing is known or likely
  to be used, meaning less generated manual offsetting/padding when the implicit
  rules cover it.
2022-05-20 13:37:26 +01:00
baldurk 4dc7b3f8b7 Process packing rules when parsing formatting strings
* Instead of having a global tight/non-tight we now let the format string
  specify the packing rules (defaulting to scalar - i.e. tight packing as
  before), and use the resulting properties to calculate packing.
2022-05-20 13:37:26 +01:00
baldurk a42f9edc3a Add annotation for binary view 2022-05-20 13:37:26 +01:00
baldurk cb49f21f2a Support enums in buffer formatter 2022-05-20 13:37:26 +01:00
baldurk 2399c9d136 Add support for bitfield packing in the buffer viewer formatting 2022-05-20 13:37:25 +01:00
baldurk cef00a102b Add struct VarType and combine flags into single field
* This is not a space saving right now, but allows more flags to be added
  without adding more storage.
2022-05-20 13:37:25 +01:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
Orson Baines 3e8eed172e Add Mesh Viewer axis mapping to vulkan, d3d11, and d3d12 drivers 2021-11-10 10:43:52 +00:00
John Kattukudiyil a2978dc33d readded custom axis mapping button and updated documentation 2021-11-08 11:39:28 +00:00
John Kattukudiyil 5ed073f395 address PR feedback
- create AxisMapping struct and fix camera location issue
- add more detail to axis mapping error message
- fix other minor issues
2021-11-08 11:39:28 +00:00
Orson Baines 35f4fad20e Issue 2322: Configure mesh coordinate system
- Add a new combo box and button to camera settings for mesh viewer
- Add a new dialog window for custom axis mappings
- Implement the axis mappings in gl driver (other drivers to come)
2021-11-08 11:39:28 +00:00
baldurk 90f3417039 Don't generate potentially unsupported vertex formats to ignore W
* When using VS In we want to ignore the W component, but that already happens
  explicitly for vulkan/GL in the shader. Mirror that same solution to D3D
  instead of trying to force a 3-component format which may not be supported
  (e.g. on AMD R16G16B16_*)
2021-09-13 19:11:28 +01:00
baldurk c820ea7735 When no draw action is selected in the mesh viewer, be explicit about it 2021-08-24 19:01:05 +01:00
baldurk dd8265bf9e Add extra protection against invalid buffers in buffer viewer 2021-08-24 17:09:28 +01:00
baldurk 0804ef63be Emulate bad vertex attribute casts on GL in mesh viewer
* On GL you can specify a vertex attribute that's stored as int but gets
  converted to float with glVertexAttribFormat instead of glVertexAttribIFormat.
  However if the shader accepts an int this is invalid and the value is
  undefined - we emulate this as the float bits being read as int directly, but
  that's not guaranteed behaviour.
* Normally we don't emulate this kind of mis-cast behaviour and just display the
  type of data passed to the shader, but in this case GL lets you specify three
  types (stored as int, cast to float, read as int) so our normal behaviour of
  just showing the input can be more misleading than normal.
2021-08-16 10:54:47 +01:00
baldurk a3d5404393 Don't use the W from VS input (and VS out with geom/tess) positions
* This allows W to be filled with 1.0 which our mesh viewing shader expects to
  have to be able to multiply by the MVP matrix.
2021-08-02 10:22:40 +01:00
baldurk 96533c71f4 Use different dialog title for different export formats. Closes #2311 2021-07-08 10:35:54 +01:00
baldurk 7149302680 Rename 'draw' or 'drawcall' to action
* There's not a good accepted terminology for this kind of event, and for
  historical reasons 'drawcall' has been the accepted term, even though
  that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
  $draw() includes draws and dispatches, but $dispatch() only includes
  dispatches, it's hard to intuitively understand why $draw() matches all
  of these calls.
* As a result we've defined the term 'action' to cover these types of
  events in the same way that we defined 'event' in the first place to
  mean a single atomic API call.
2021-07-01 15:15:05 +01:00
baldurk 93f0997c12 Fix crash on 32-bit index buffers that are less than 4 bytes in size 2021-04-29 10:25:18 +01:00
baldurk 52612c1f66 Apply out-of-bounds index count clamping to VS output 2021-04-28 10:36:59 +01:00
baldurk 95e6a4a971 Respect font scale for fixed-width fonts 2021-04-12 13:04:02 +01:00
baldurk da288830c0 Fix display of doubles in mesh output 2021-03-22 18:37:10 +00:00
baldurk 30dd13feb8 Pull index byte width and topology out of drawcall state
* These are treated as state on most APIs, only GL treats it as a drawcall
  parameter.
2021-02-24 13:52:07 +00:00
baldurk d66133d610 Fix handling of buffer length & offset in buffer viewer
* Previously the length was always being treated as buffer-relative instead of
  offset-relative.
2021-02-15 12:56:21 +00:00
baldurk 907ce48f7a Display message when no vertices or instances are present in drawcall 2021-02-15 12:56:21 +00:00