Commit Graph

254 Commits

Author SHA1 Message Date
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
baldurk 0e86f0e320 Fix overflow setting rowOffset when numRows is 0 2021-02-15 12:56:21 +00:00
baldurk b31d7d94e8 An instanced draw with no instances has no vertices even if numIndices>0
* If we show this with vertex input data in the mesh viewer that's quite
  confusing when the draw is degenerate.
2021-02-15 12:56:21 +00:00
baldurk 1fe92989b7 Fix aspect ratio calculation for negative viewport height 2021-01-19 17:10:09 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk e970ee0e33 Fix issue with clamped length with byte offset in buffer viewer 2021-01-06 16:58:43 +00:00
baldurk eabc6990b0 Don't try to always read 4 components of data from output. Closes #2119 2020-12-17 22:23:34 +00:00
baldurk f32008e95f Add access for changing the 3D preview stage in mesh viewer 2020-12-15 22:52:37 +00:00
baldurk 8107a7a795 Account for array stride when unrolling AoS in buffer viewer 2020-12-09 18:16:08 +00:00
baldurk 6b8ce92d88 Clean up docstrings in python interfaces to be strictly typed/formatted
* Also added a script that can run as part of CI to verify that the docstring
  matches, by generating a regex from the docstring documented parameter types
  and return type and making sure we find a match within the C headers. This
  ensures all parameters are documented with the right types, no extra
  parameters are documented, and the return type is correct.
* The script also checks proper scoping so that if qrenderdoc docstrings
  mention a renderdoc type, they need to scope it properly.
2020-12-07 17:44:51 +00:00
baldurk 9610919c16 Fix copy-paste of rich resource text
* We need to cache to the QString text on demand, which requires a context
  potentially sooner than paint/etc time.
2020-12-02 17:44:46 +00:00
baldurk a34d7b1965 Don't bind Qt signals multiple times for custom paint widgets 2020-11-24 16:29:36 +00:00
baldurk 58e16414e0 Add a number of control functions to the Qt python interface 2020-11-20 17:02:33 +00:00
baldurk 3f5a911483 Refactor CustomPaintWidget to handle widget recreation internally
* This allows us to expose to to python as a easy-to-use "replay output ready"
  widget.
2020-11-19 14:47:11 +00:00
baldurk 6320923966 When VB stride is 0 read enough data for any single attribute 2020-11-12 17:04:43 +00:00
baldurk 03b7229bad Support choosing multiview viewport in vertex debugging on vulkan 2020-10-28 13:34:08 +00:00
baldurk e1d025e4ef Don't fetch buffer data if it's not yet initialised 2020-10-02 12:53:38 +01:00
baldurk da0c836aef Cache bufferviewer column width calculation 2020-09-03 17:26:48 +01:00
baldurk bc3f23e867 Add missing bounds check for 32-bit indices 2020-08-13 11:36:07 +01:00
baldurk 0d026a43d6 Remove CompType::Double
* This is a leftover artifact from before we had general extended type support
  and double was the only non-32 bit type we handled. Now we support most type
  formats so doubles are just CompType::Float with 8 byte width
2020-07-12 10:52:10 +01:00
baldurk c10089c94b Invert y display for vulkan with negative viewport height. Closes #1971 2020-07-06 11:20:23 +01:00
baldurk d2557d3966 Fix linux compilation 2020-06-30 21:53:32 +01:00
baldurk e5e9a9c94b Use QDoubleSpinBox for partial 64-bit int support. Closes #1952
* Actually creating a 64-bit spinbox is not feasible without constructing it
  almost from scratch due to how much QAbstractSpinBox depends on private
  internals that can't be overridden. Instead use a QDoubleSpinBox with no
  decimals since we don't need the full 64-bit range, and the mantissa of a
  double is enough.
2020-06-30 12:34:52 +01:00
baldurk dfc82b3bd2 Prevent debugging graphics stages if no drawcall is selected 2020-06-29 18:34:07 +01:00
baldurk d4ddb565d0 Add a per-shader debuggable flag to allow finer grained status
* E.g. on D3D12 we can debug DXBC shaders but not DXIL shaders. On vulkan this
  will allow us to have the UI work better when encountering shaders with
  unsupported capabilities or extensions.
2020-06-18 17:22:45 +01:00
baldurk 9805c9d662 Fix calculation of index buffer offset. Closes #1948 2020-06-15 15:44:09 +01:00
baldurk a0a373a8e1 Fix handling of buffer truncation and zero-sized buffers 2020-05-29 17:26:29 +01:00
baldurk b0cd8584fb Fix placement & handling of final next page button in buffer viewer 2020-05-27 22:38:23 +01:00
baldurk 0736a977a2 Handle nested struct offsets properly in raw buffer viewer 2020-05-26 13:53:25 +01:00
baldurk 571b286eb3 Fix bytesize calculation of vertex output attributes 2020-05-20 11:52:24 +01:00
baldurk 3bd09bd4a9 Fix applying offset wrongly on unclamped length 2020-05-11 18:04:22 +01:00
baldurk 90c10ea1fc Handle boolean inputs in vulkan shader parameters
* We change to use VarType instead of CompType for signature parameters which
  allows us to represent different types of variables beyond just
  unsigned/signed integer and float.
2020-05-07 22:46:41 +01:00
baldurk 7c265efe2e Configure ShaderConstant descriptor for vertex inputs 2020-04-28 18:15:33 +01:00