Commit Graph

257 Commits

Author SHA1 Message Date
baldurk c9a621a812 List registers last in shader viewer tables 2024-12-19 15:13:52 +00:00
baldurk 5c73842332 Fix source variables not properly propagating updateID 2024-12-19 14:08:02 +00:00
Jake Turner 11870b184a ShaderViewer support for ShaderDirectAccess shader resources
i.e. D3D12 SM6.6 HLSL Dynamic resources which index directly into the resource/sampler heap and not via shader bindings.
2024-12-04 13:40:17 +00:00
Jake Turner 2443dbcb55 Shader Editing: Fix problem where single Replace didn't work
Use the same findHash string in performReplace() as in performFind() by including the find direction in the findHash in performReplace()
2024-11-09 07:07:11 +00:00
Louis de Carufel 71ac13e9bf Bookmarks are now listed in menu. 2024-06-13 10:27:41 +01:00
Jake Turner b7b5ec0c14 Remove device scaling factor from margins in the UI
Makes ShaderViewer, Capture Comments and Python Shell margins look correct for non-unit system scaling
2024-06-12 16:37:02 +01:00
baldurk 341f9a689b Fix shader viewer bookmarks to work with editing and viewing shaders
* Previously it was only applied for debugging shaders.
2024-05-31 15:26:07 +01:00
Louis de Carufel 0e64cc5368 Added shader viewer bookmarks and find shortcuts. 2024-05-24 10:35:06 +01:00
baldurk 205ed0e6fa Remove old shader bindpoint mapping handling entirely 2024-04-10 18:58:52 +01:00
baldurk 2bbe1a8cd9 Update shader viewer and debugging with new reporting for shader binds
* This shifts from reporting from the old style bindset/bind to the new system
  of only referencing by shader interface and index (independent of binding
  model).
* The vulkan shader debugger re-uses the replay interface to cache descriptor
  access and descriptor contents in a fashion friendly to interface-index
  lookup.
2024-04-10 18:58:51 +01:00
Jake Turner 3a8fecf08e Prevent Shader Editor tooltip showing multiple "(F5)" 2024-04-10 08:20:56 +01:00
baldurk 3e2340fe16 Add identified support for slang (the language and the tool) 2024-03-01 12:11:37 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
baldurk 69dcb42a05 Add enums and API-agnostic handling for new task and mesh shader stages
* The enums are given after compute, to preserve indices for the normal vertex
  pipeline.
* Mesh dispatches are considered a new action type, rather than being bundled
  into the `Drawcall` type. This will allow them to be distinguished by API
  backends as needed. The UI treats them as drawcalls
* We apply this universally even though it's not relevant to D3D11/GL. It means
  a couple of empty array entries but it should not cause any significant
  issues.
* Shader messages will be identified by group and thread as with compute
  shaders. For mesh shaders there is an additional subdivision to identify them
  by task group, since each task group can submit a grid of mesh groups.
2023-11-16 18:20:23 +00:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
baldurk e7430226e9 Match SPIR-V version as much as possible when rebuilding shaders 2023-08-22 13:41:39 +01:00
baldurk 19d7b038c2 Don't allow tooltip to display if context menu is shown in shader viewer 2023-08-04 17:06:02 +01:00
William Pearson f82ef87595 Enable tooltips for shader execute forwards/backwards menus
MakeExecuteAction already sets tooltips for each QAction it creates,
but these are not used in a QMenu unless the toolTipsVisible property
is set to true.
2023-04-14 19:04:15 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk 0acb955e19 Create virtual distinction between Vulkan & GL SPIR-V. Closes #2798
* This distinction unfortunately does not exist in SPIR-V so we have to carry
  around this metadata ourselves. Rather than allowing free specification of
  tools based on API, instead pretend that Vulkan and GL SPIR-V are separate
  format, and duplicate all SPIR-V tools to handle "both" types. This allows
  appropriate tool selection based on the encoding.
2022-12-27 13:39:44 +00:00
baldurk 305eb33204 Show better tooltips for constant buffers & structs
* { ... } is clearer than having just ??? show up which looks like an error.
2022-09-13 17:24:42 +01:00
baldurk b49d7982d6 When looking for the start of an line, ignore if there's no debug info
* When searching for the start of a range of instructions mapped to a single
  line when stepping backwards, we need to ignore instructions that don't have
  any debug info because they will look like a 'different' smaller stack.
2022-09-13 17:24:42 +01:00
baldurk 3013be8d52 Fix use of wrong instruction counter when instruction info is sparse 2022-09-13 17:24:42 +01:00
baldurk c3c791be55 When editing a shader, default to the edit base file
* In the case of a munged file with #line directives, we want to edit that file,
  not the split-out view of the file containing the entry point.
2022-08-11 10:23:48 +01:00
baldurk 855ad1afed Fix instruction number on DXBC instruction info 2022-08-10 14:56:44 +01:00
baldurk e061ea3b2e Improve handling of compilers & command line for edited shaders
* We store the compiler used (when known) in shader debug info and use that to
  select the compiler for editing as even higher priority than the default for a
  given language/encoding combination.
* We also ensure that for known tools we add the input and output parameters
  last, after any custom parameters, so that they are always present regardless
  of what the user puts in.
2022-08-10 14:56:44 +01:00
baldurk 94d1ce3917 Cache text for GPUAddress values properly 2022-08-04 16:56:32 +01:00
baldurk db1f17476e Track variables being changed across steps/runs
* This allows us to more accurately display those that have been modified since
  the last step, when a source-level step covers multiple instruction-level
  steps.
* We also do our own sorting of source variables based on how recently they were
  updated. This applies in both directions, so stepping backwards and
  'reversing' a variable change will also count as a recent update.
2022-08-03 17:44:11 +01:00
baldurk 935fa49c98 Store source vars data per-instruction rather than per-state
* Since the source vars data doesn't change for a given instruction, we can pre-
  calculate it and save time on re-calculating per-state.
* Note callstack *can* change per-state on SPIR-V where the same instruction can
  be reached by different flow paths, so the callstack remains part of the per-
  state data.
2022-08-03 17:44:11 +01:00
baldurk fda5c4819a Scroll shader viewer to entry point file & line using debug info 2022-07-22 16:10:59 +01:00
baldurk c817b6f9ff Fix clang warning 2022-06-30 14:49:02 +01:00
baldurk 7990254bc0 Avoid copying shader debug states, only move them 2022-06-30 13:51:26 +01:00
baldurk b9e5e2fd5c Use QList for variables in ShaderViewer
* Using a linked list instead of a vector makes insert/erase operations for
  variables being created and destroyed significantly faster.
2022-06-30 13:24:36 +01:00
baldurk 20f42feab4 Improve mapping of breakpoints to disassembly & source
* We breakpoint directly on source/disassembly lines rather than trying to map
  to instructions that may get stepped over and skipped.
2022-06-22 20:04:42 +01:00
baldurk fcc7eada44 Ignore whitespace when matching variable tooltip expressions 2022-06-02 17:01:48 +01:00
baldurk 77232e0288 Fix lookup of HLSL direct cbuffer variable references 2022-05-31 13:06:42 +01:00
baldurk abe645f031 Add support for saving and loading structure definitions 2022-05-20 14:15:30 +01:00
baldurk cb49f21f2a Support enums in buffer formatter 2022-05-20 13:37:26 +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 2fc0866c9f Fix display of register names for matrix source variables 2022-05-09 11:32:11 +01:00
baldurk e5000ff91b Handle source variables that map to non-existant debug variables 2022-05-04 15:47:04 +01:00
baldurk d9c98f44f6 Fix stepping backwards working incorrectly with multiple location maps 2022-04-28 16:34:44 +01:00
baldurk 1201d47db4 Fix tooltips for sampler variables in shader debugger 2022-04-21 00:58:15 +01:00
baldurk 26585e9a1b Fix arrayed resource bindings shader debug variables. Closes #2550 2022-04-18 17:06:44 +01:00
baldurk be38f45171 Fix handling of split-register matrix source variables. Closes #2536 2022-04-11 12:57:10 +01:00
baldurk 9c1eeed29b Fix copy-paste error with GLSL unsigned integer texture declarations 2022-03-30 12:51:36 +01:00
baldurk 378cad24bd Fix some missing comments in custom shader snippet generation 2022-03-30 12:48:38 +01:00
baldurk ad9a4e854f Fix to bizarre CI failure
* For some reason using != on these QSet<QString> fails in release only on
  github's CI only. I don't know what is broken on their runners but this
  workaround fixes it.
2022-03-09 03:02:13 +00:00
baldurk a265a8363d Compile fixes 2022-03-08 18:32:31 +00:00
baldurk 7b4f535663 Refactor watch variables to support complex types including structs 2022-03-07 18:45:57 +00:00