Commit Graph

25 Commits

Author SHA1 Message Date
Louis de Carufel 0e64cc5368 Added shader viewer bookmarks and find shortcuts. 2024-05-24 10:35:06 +01:00
William Pearson d150d8f2b7 Use instant popup for shader execute forwards/backwards buttons
There is no action associated with clicking the button itself, only for
the menu associated with it. Using QToolButton::MenuButtonPopup means
that the majority of the button is for the button's own action, and
there is a small arrow next to the button that shows the menu. Since
there's no action, this means that the small menu arrow needs to be
clicked each time instead of the big button, which is annoying.
QToolButton::InstantPopup instead always shows the menu (though it
doesn't have the arrow indicating a menu exists, although this is not
particularly important).

InstantPopup is also already used for the "Insert" button used when
editing a custom shader for the texture viewer. MenuButtonPopup is used
in many other places throughout RenderDoc, but they are all save or
export buttons where there is a meaningful default action.
2023-04-14 19:04:15 +01:00
baldurk 8e76069ecf Switch watch variables control from table to tree widget
* This will allow watching structs or arrays
2022-03-07 14:45:44 +00:00
baldurk a16e1e7995 Add a python script to sort .ui files so grid layouts are in order
* This will help in future to keep diffs more readable
2022-01-10 17:30:57 +00:00
baldurk 1c3f30d90d Resave all UI files with Qt Creator 5.15
* This gets rid of anything that might be changed with the latest version when
  updating these files
2022-01-10 16:57:43 +00:00
baldurk d4a5592780 Add functionality to reset an edited shader to original. Closes #2334
* We also add the ability to toggle on/off the replacement being active without
  needing to intentionally add a compile error (and this also makes it more
  explicitly clear when the shader replacement is enabled or not. This could be
  useful for quick A/B testing between the edited version and the original.
2021-11-02 14:09:50 +00:00
baldurk 124d0e71b6 Implement more flexible step/run options. Closes #2276 Closes #2312
* We split stepping for source debugging into step over/into/out depending on
  how it handles function calls. Step Into is the same behaviour as before - it
  steps to the next source line executed regardless of if it's inside a function
  call. Step Over is similar but will not enter function calls. We define that
  as the callstack growing (so staying the same or shrinking - returning from a
  function - is OK), and this is as accurate as the underlying debug
  information. Step Out will run until the callstack shrinks, i.e. returning
  from a function.
* This is a slight behaviour change of keyboard shortcuts - F10 was effectively
  doing step into and will now step over. F11 will step into which is the old
  behaviour.
* All these variants have backwards versions, and to remain consistent we keep
  the shift modifier as forwards/backwards. This differs from visal studio where
  step out is shift-F10.
* The seems like the best balance - using any other variant would likely confuse
  muscle memory of anyone used to visual studio (where these shortcuts are
  intended to mimick), if only because F10 would be step into whether or not F11
  is used for step over or some other key which would likely be even more
  confusing either way. Trying to twist to use Shift-F10 for step out would be
  inconsistent with the other backwards running operations and likely cause more
  confusion than it saves in matching VS's shortcuts exactly. Also an accidental
  Shift-F10 is not too destructive, the user can realise it didn't Step Out
  forwards, and press Ctrl-F10 or look up the button.
* The hope is that most likely people doing source debugging and familiar with
  these keys expect F10 to step over, so the previous behaviour was unexpected
  but easy to work around, and that changing the meaning of the key won't
  disrupt them. Or at least the disruption is less than other alternatives.
2021-07-21 13:39:26 +01:00
Steve Karolewics ef58d7e1f8 Extend info in accessed resources panel in the shader viewer 2020-05-08 20:43:04 +01:00
Steve Karolewics 2c4f2a57a8 Add resource tracking to DXBC shader debugging
When a resource is accessed, it is now tracked by the debug step. The
shader viewer has a new panel to display resources accessed up to the
current step, with context menus to go to previous/next access of a
specific resource.
2020-04-27 18:16:46 +01:00
baldurk 0e0ff8714c Add fake source-mapping information for constants in debug traces
* cbuffer and input registers no longer have any names elided into them, they
  are 'raw' registers. The source mapping provides the information of where they
  come from as best as possible.
* Since we're now using source-mapping for constants, fix some source mapping
  issues with arrays, nested structs/arrays, and matrix major-ness.
2020-02-06 17:58:41 +00:00
baldurk 3c7b420e59 Expand SPIR-V disassemblers to general shader processing tools
* Instead of just configuring SPIR-V disassemblers and picking only the first
  one when we need to edit SPIR-V, we allow setting up any shader processor that
  goes between two shader encodings.
* When editing, the default will still be to use embedded source, and then after
  that the first tool that goes from the native shader format to a text format,
  but the drop-down allows you to pick any of them.
* Similarly in the shader viewer you can configure the compilation options and
  method, to choose the compiler you want to use. Embedded command line
  parameters in the shader are automatically appended.
2018-08-09 16:56:53 +01:00
baldurk ec2806df06 Add context menu for manipulating watch panel 2018-06-22 19:28:34 +01:00
baldurk 04f214c768 Add toolbar button to switch between HLSL and assembly debugging
* This hopefully makes the HLSL debug mode more obvious to people.
2018-06-22 19:28:34 +01:00
baldurk 8b5ab06da7 Rename variables panel to registers 2018-06-22 19:28:32 +01:00
baldurk ff9f5675e9 Display high-level language locals corresponding to registers 2018-06-22 19:28:30 +01:00
baldurk e2dcd902cd Gather and display callstack information during shader debugging 2018-06-22 19:28:30 +01:00
baldurk 525facfcd0 Remove unnecessary extra frames from shader viewer displays 2018-02-24 23:22:22 +00:00
baldurk f6ccd537b6 Change shader edit controls from Ctrl-S / save to F5 / Refresh
* This is a bit less ambiguous and less confusing in the case where
  someone is expecting a "compile" type button instead of "save changes"
  type button.
2018-02-09 17:19:29 +00:00
baldurk d44528794a Change qrenderdoc icons to Farm-Fresh, to add high-DPI versions. 2017-06-19 16:17:20 +01:00
baldurk d515c69a9f Remove alternating row colors in most places.
* This was only added because the default tree widget controls don't
  render any grid lines. Now that we're custom drawing them, the row
  colors are distracting and can be confusing on themes where the
  selected row is very faint.
2017-06-13 18:19:02 +01:00
baldurk 2da46640d0 Add watch variables handling to qt shader viewer 2017-06-09 12:06:57 +01:00
baldurk f65f5ea9da Use new RDTreeWidget everywhere in favour of QTreeWidget
* Since we're promoting everything, we reset the behaviour of
  RDTreeWidget so that it's not doing anything different by default.
* RDTreeWidget's interface is a bit different, exposing some useful
  things like a single selected item and so on.
* We also can't set columns in the Qt Creator UI anymore, so we set them
  from code.
2017-04-21 18:44:52 +01:00
baldurk 8630f82db3 Update shader viewer to support editing and debugging of shaders 2017-02-10 21:48:50 +00:00
baldurk c5adc7a4ed Use relative paths for 3rdparty headers, don't add to search paths
* Unfortunately scintilla assumes its headers are all in the search path
  so where possible we only add those folders when compiling scintilla
  source, not our own.
2017-02-09 19:28:22 +00:00
baldurk 7ef73f92ef Add shader viewer (view only - not edit/debug) using Scintilla widget 2017-01-23 19:09:29 +00:00