82 Commits

Author SHA1 Message Date
baldurk 643edbe8a7 Fix cases where find results or file list were breaking
* The change to make the disassembly view not directly a child of a
  DockContent but instead a table layout (to add the disassembly type
  drop-down) were causing some casts of 'thing.Parent' to fail.
2017-08-14 11:18:11 +01:00
baldurk 11a47bfbe4 Don't set-up table layout with disasm type selector in debug case
* Otherwise it hangs around and breaks the layout when we don't want it
  to be visible at all
2017-08-14 10:54:19 +01:00
baldurk b7795f562d Search up the parent heirarchy for a DockContent
* Fixes a crash debugging a shader that has embedded source available
  (i.e. compiled with D3DCOMPILE_DEBUG).
2017-08-06 09:58:30 +01:00
baldurk 9878223839 Don't allow displaying non-debuggable disassembly forms when debugging 2017-08-02 15:30:58 +01:00
baldurk 79101c7b13 Move DXBC shader friendly naming logic into C++ side code
* This makes more sense and lets us share it between Qt and C# UIs.
2017-07-05 20:37:49 +01:00
baldurk 13bf08a99e Remove disassembly from shader reflection, request it on demand 2017-07-05 16:31:44 +01:00
baldurk bdf2a68c71 Add shader's ID and entry point to the shader reflection struct
* This allows better identification of a shader from its reflection
  bundle. The entry point was already 'optionally' in the debug info
  struct which is no longer a great location for it.
* For APIs where the entry point isn't contractual and it might not be
  listed, instead we just fall back to 'main'. This means that the UI
  or anyone fetching the info can be guaranteed that some sensible entry
  point will be listed.
* Also for the debug info, remove the 'entryFile' index and instead just
  guarantee that as much as possible the entry point will be in the
  first file in the list.
2017-07-05 16:29:26 +01:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
Michael Vance 366581fb3f Add 'run to sample/load/gather' and 'run to generated inf/nan'.
- ShaderDebugState now carries a 'flags' that can be updated when the interpreter is run. Currently supported flags are 'sample/load/gather insn' or 'insn generated nan/inf'.
- DXBC interpreter now pushes operation type into results for simple intrinsics. This avoids the situation where temp decls are by default uint-typed, and any arithmetic operation on float or double operands would result in a uint shader variable. Other intrinsics are largely correct because they create temporaries with appropriate typed constructors.
- Provide icons for user interface elements, based on the existing 'run to' icons with modifications by myself.
2016-12-29 17:11:55 +00:00
baldurk 32c9180f82 Don't try to show find-all dialog if it's already visible 2016-11-21 16:46:31 +01:00
baldurk 0c06590df3 Remove cubemap binding from D3D/HLSL texture view. Just use 2D array 2016-11-18 16:31:05 +01:00
baldurk 175cda5f36 Fix friendly naming of registers for proper cbuffer bindpoint handling 2016-11-02 23:39:35 +01:00
baldurk 1f610a8b31 Treat D3D11 and D3D12 the same around the UI (for naming things, etc) 2016-10-18 10:38:53 +02:00
baldurk b4f30d79cd Don't do shader register renaming on anything but D3D11 2016-09-06 18:29:01 +02:00
baldurk e8e3d50c86 Expose the different local and remote renderers to the UI 2016-08-24 15:53:58 +02:00
baldurk 610b22f600 Fix a lot of high-contrast inconsistencies or brokenness. Refs #315
* In a couple of places I had to resort to if(IsHighContrast) but mostly
  this is just using system brushes consistently or not assuming black
  text.
* The default DockPanel theme doesn't work well, so make a minimal high-
  contrast theme for it and assign it everywhere.
* The pipeline flow was using fixed colours, use system brushes for the
  different elements and switch based on high-contrast to ensure active
  and inactive stages are visible (using ActiveCaption looks bad on
  normal themes because it's a big block of colour).
* For some reason the flat toolstrip renderer doesn't handle white-on-
  black themes, but the system one does. It's a little clunkier but it
  shows up correctly without writing tons of custom painting code.
* Range histogram uses a properly contrasting colour for the border.
* Treelist views use a better system colour for selected rows when
  inactive and hovered rows (when high contrast).
* Mesh view grids have a system background instead of white
* Various things (pipeline state, mesh viewe) set text colour when
  colourising backgrounds of things instead of assuming black.
2016-08-05 12:46:56 +02:00
baldurk 4f06161fb9 Update template custom shader to include UV, add new globals. Refs #304 2016-07-26 15:18:45 +02:00
baldurk 889e47c166 Handle column major storage of matrices when friendly-naming registers 2016-07-22 19:19:42 +02:00
baldurk 81c8f1f77e Prefix GL uniforms with 'uniform'. Refs #302 2016-07-19 19:19:57 +02:00
baldurk 3e171f7f79 Remove top-most windows, we shouldn't have any (just above-rest-of) 2016-07-04 10:59:11 +02:00
baldurk 745df431db Remove unused debug trace line 2016-06-23 11:19:43 +02:00
baldurk 6403b5a6d6 Use full pathnames for files, so we don't have duplicate keys in dict 2016-06-21 13:35:21 +02:00
baldurk 8b64868025 For GLSL, insert text after #version statement. 2016-06-09 10:48:50 -07:00
baldurk 22d58cf739 Implement custom display shaders for vulkan 2016-06-09 10:48:44 -07:00
baldurk ebeaa935af Implement copy-paste handlers for shader debugging reg windows 2016-05-09 22:22:37 +02:00
baldurk 945f423cde Don't let the user undo the initial text added to a Scintilla editor 2016-05-09 22:00:31 +02:00
baldurk 33d8585bdb Change default ID name from {x} to _x_.
* I think eyes are just more use to parsing legal identifier characters
  (like _s) rather than {}s syntax. It feels like it's probably more
  readable overall, although there's more of a risk of it blending into
  the names in the original code
2016-04-22 17:36:55 +02:00
baldurk 70b99a4412 Remove antiquated 'multiple frames in one capture' support.
* Cleans up the code a bunch, this support is unlikely to ever return
  and if it does it will need a rethink anyway.
2016-04-13 00:28:09 +02:00
baldurk 254321fcd1 Quick hacks to show SPIR-V disassembly with hlsl highlighting 2016-02-07 18:51:23 +01:00
baldurk 2e0ffa7813 Batch update copyright years everywhere 2016-02-07 18:50:45 +01:00
baldurk 03a2497c6b Don't display semantic index if it's not needed 2016-02-07 18:47:09 +01:00
baldurk 6051f0c500 Split 'Resources' shader array into readonly/readwrite arrays
* This is preparation for a following commit, might not work on its own
  (mostly untested - just compiling).
2016-02-07 18:46:39 +01:00
baldurk c71191906b Don't do any shader viewer work if the log is closed 2016-02-07 18:45:25 +01:00
baldurk 0a0e948e40 Add shader word highlighting for SPIR-V 2016-02-07 18:42:06 +01:00
baldurk efd8bf1baf Fix reported crash - close any find dialogs when shader window closes 2015-12-15 17:26:28 +01:00
baldurk e9d7e51159 Handle shader reflection being NULL without crashing. Refs #168
* Can happen in edge cases where the separable program fails to create.
2015-11-09 22:52:17 +01:00
baldurk 11286b0f71 Make sure find results textbox is marked read-only 2015-10-07 20:00:45 +02:00
baldurk a98e7eb9d6 Clear search results for each new search 2015-10-07 20:00:33 +02:00
baldurk 239abd08dd Remove all newlines from find-in-files results 2015-10-07 19:56:52 +02:00
baldurk 7fdadc52f7 Fix register/variable highlighting sometimes getting busted 2015-09-23 13:30:12 +02:00
baldurk 51f8e949a1 Add back some code that was deleted by accident 2015-09-23 13:29:54 +02:00
baldurk e58c7aff13 Add extra bounds check just in case trace has no steps. 2015-09-16 01:18:14 +02:00
baldurk 95be5454f9 Add a "Find in all files" dialog on ctrl-shift-f to shader viewer 2015-08-29 19:26:50 +02:00
baldurk 9f43f12135 Add a list of all files in shader viewer when there are more than 3 2015-08-29 17:18:28 +02:00
baldurk 8ca621a649 Handle invalid characters in shader filename paths everywhere 2015-07-25 10:33:52 +02:00
baldurk 49f5f4cde4 Add Shift-F5 to run backwards in shader debugging 2015-07-19 00:20:03 +02:00
baldurk f6527107dc Add try {} catch to handle exceptions thrown from IO operations 2015-07-07 19:06:31 +02:00
baldurk 80c76fab5f Completely speculative fix for crash in shader viewer tooltip
* There were two bug reports of NullReferenceException on line:

  hoverWin = m_HoverNode.OwnerView;
* Which doesn't make sense since m_HoverNode must be non-null to go by
  the lines above, and all the callbacks should run on the UI thread so
  it can't be a race.
* Caching locally and checking for OwnerView/ListView being valid might
  fix the crash. Hopefully!
2015-07-07 18:05:17 +02:00
baldurk e79c98c85a Fix crash if tooltip is still open when watch variable is deleted 2015-07-07 17:38:52 +02:00
baldurk 7f240b4d14 Update the register tooltip as you step, if it's open 2015-07-07 16:48:02 +02:00