Commit Graph

66 Commits

Author SHA1 Message Date
baldurk fd899cdb96 Fix disassembly not being on top when first debugging a shader 2018-01-17 21:07:04 +00:00
baldurk 34fc993b59 Calculate column widths with devicePixelRatio 2018-01-16 20:12:06 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 2b083b7910 Add options for UI-configured SPIR-V disassemblers to shader viewer 2017-12-22 17:03:10 +00:00
baldurk ebaefc82a9 Normalise and make python/public interface more consistent
* We enforce a naming scheme more strongly - types, member functions,
  and enum values must be UpperCaseCamel, and member variables must be
  lowerCaseCamel. No underscores allowed.
* eventId not eventID or EID, and Id preferred to ID in general. Also
  for resourceId.
* Removed some lingering hungarian m_Foo naming.
* Some pipeline state structs that are almost identical between the
  different APIs are pulled out into common structs. Where something
  doesn't make sense (e.g. viewport enable for vulkan) it will just be
  set to a sensible default (in that case always true).
* Changed scissors to be x/y & width/height instead of sometimes
  left/top/right/bottom
* Abbreviations are discouraged, e.g. operation not op, function not
  func.
2017-12-22 13:02:36 +00:00
baldurk 0b527fab49 Use rdc types instead of Qt containers in public QRenderDoc interface
* This is to support python bindings - the pyside implementation of
  QVector, QString, etc is not available to SWIG, so SWIG treates these
  all as opaque types.
* Rather than trying to set up bindings that work for rdcarray and
  QList/QVector, or implementing separate bindings, we instead just say
  that the public interface must use the rdc types. In most cases they
  seamlessly convert to/from Qt types anyway.
* In a couple of places we use an array of pairs instead of a map. In
  future we probably want an rdcdict or rdcmap with proper dict bindings
  in python.
2017-12-13 22:43:01 +00:00
baldurk a6ebf09785 Add analytics system - disabled for now
* This is a *very* light-touch analytics system that will track the
  simplest and most anonymous statistics that can be useful in
  determining which features are most used or perhaps underused, and
  where it's best to direct development attention.
* It is entirely implemented in the UI layer, no analytics-gathering
  code exists in the library that's injected into programs, and of
  course no capture data (screenshots, resource contents, shaders, etc
  etc) is transmitted.
* Once it's turned on, it will apply to both development and release
  builds. It tracks stats over a month, and then at the beginning of a
  new month it sends the previous data.
* When the user first starts up a build with analytics if there's no
  previous analytics database then they are informed of the new code and
  asked to approve it. They have the option of selecting to manually
  verify any sent reports, or just opt-ing out entirely.
2017-11-29 19:01:22 +00:00
baldurk 1d05177141 Add Qt helper for constructin rdcstr directly from QString 2017-11-29 19:01:21 +00:00
baldurk 602511bf33 Reduce parameters that need to be passed for viewing shaders 2017-11-22 19:11:27 +00:00
baldurk 38acc56084 Unregister shortcuts when closing windows that registered shortcuts
* This prevents leaking for cases where new widgets are created (and
  the small chance a widget pointer could be re-used and cause serious
  problems), and multiple-registration errors for global shortcuts.
2017-11-22 19:11:25 +00:00
Cory Bloor 58b628ee8b Fix unused variables
In almost all cases these can be removed. The only exception is in
ShaderViewer.cpp, where regIdx should have been used.
2017-11-18 00:17:06 +01:00
baldurk 33ff48811b Normalise terminology in UI code - don't call captures 'logs'
* Log is an overloaded term since it can also mean the debug log. We now
  consistently refer to capture files as capture files or just captures
  for short. The log is just for log messages and diagnostics.
* The user-facing UI was mostly already consistent, but many of the
  public interfaces exposed to python needed to be renamed, and it made
  more sense just to make everything consistent.
2017-11-17 16:30:57 +00:00
baldurk 2ac0802b10 When a custom name is changed, refresh the UI to propagate it properly 2017-11-17 16:30:54 +00:00
baldurk 7c8628b237 Centralise resource naming with capture context to allow customisation
* We remove the now unneeded name fields in buffer/texture descriptions
  and some of the pipeline state structs.
* A single function will give the human-readable name for a resource id.
  This will look up a custom set of renames, on top of the names from
  the resource descriptions.
2017-11-17 16:30:53 +00:00
baldurk 2f02f2159e Fix some margins/spacings to be more consistent across the UI 2017-11-10 18:36:10 +00:00
baldurk b992e95f94 Update replay proxy to use new serialisation mechanism 2017-11-07 19:30:36 +00:00
baldurk e6c5c03896 Remove rdctype namespace. Rename rdctype::str -> rdcstr, rdcarray, etc
* Since these types are more prevalent than originally designed, it
  makes more sense to remove the namespace for ease of typing/naming.
* Also add a specialised type 'bytebuf' for an array of bytes.
* This makes mapping easier to SWIG since there's no special casing for
  namespaced arrays. Especially so for nested cases like
  rdctype::array<rdctype::str> -> rdcarray<rdcstr>
2017-11-03 16:04:59 +00:00
baldurk 5e59616a8c Update rdctype::array to have a more stl-like mutable interface
* For the most part the interface is stl-compatible, but we have a few
  little changes of our own for convenience.
* This class is still needed after deleting the C# UI, because we don't
  want to pass C++ stl structs over module boundaries and possibly run
  into hard to diagnose incompatibilities.
2017-11-03 16:01:58 +00:00
baldurk 42abaf2b4f Prefer using VK_AMD_shader_info to disassemble when available. 2017-10-23 15:05:29 +01:00
baldurk bf3214e8a2 Don't display a register/slot index for built-in shader variables 2017-09-19 17:28:12 +01:00
baldurk b1031c8036 Remove samplers from ReadOnlyResources array, put them in their own list 2017-08-31 18:34:17 +01:00
baldurk 1b88a39339 Optimise tree widget clearing and child adding by batching updates
* This takes a nice chunk of time off the pipeline state view in
  particular when changing between events.
2017-08-21 17:14:21 +01:00
baldurk 981436b75f Don't pass around string name of ResourceFormat, request it when needed 2017-08-18 19:37:16 +01:00
baldurk 4c24b0f28f Remove use of ToQStr to convert rdctype::str to QString 2017-08-18 14:13:22 +01:00
baldurk 86a9d70bb7 Only remover disassembly toolbar when debugging, not when viewing shader 2017-08-03 17:57:21 +01:00
baldurk 9878223839 Don't allow displaying non-debuggable disassembly forms when debugging 2017-08-02 15:30:58 +01:00
baldurk d57cc1b188 Add more consistency to docking panels and widgets
* Dock panels shouldn't have any frame border or anything like that.
* They should have an external margin of 3 pixels at their border,
  but then no further margins on the layouts (like sub-controls for
  the pipeline state views.
* Toolbars should be Raised & Panel frames. Later we'll replace them
  with actual QToolBars to better customise the painting.
2017-07-28 19:06:46 +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 6ea2358d60 Remove an errant debug print 2017-06-21 21:14:57 +01:00
baldurk d44528794a Change qrenderdoc icons to Farm-Fresh, to add high-DPI versions. 2017-06-19 16:17:20 +01:00
baldurk efe105a203 Remove TODO for implemented feature 2017-06-16 23:07:50 +01:00
baldurk ab96b05b53 Remove mistaken double assignment 2017-06-09 19:38:23 +01:00
baldurk f6399609f9 Add headers for mouse and key events being used 2017-06-09 19:36:46 +01:00
baldurk 1574103613 Add click-to-highlight for registers 2017-06-09 17:57:33 +01:00
baldurk 0cfa8c1eb9 Add variable tooltips to the shader viewer showing float/int/uint values 2017-06-09 17:04:23 +01:00
baldurk 2da46640d0 Add watch variables handling to qt shader viewer 2017-06-09 12:06:57 +01:00
baldurk 199c26adbf Put the MainWindow in charge of handling 'global' type shortcuts
* QShortcut falls down on duplicates. It can have activatedAmbiguously
  events, but these happen in arbitrary order and the shortcuts on
  menu items just swallow the ambiguous activate so it's not useful.
* Instead we just let MainWindow pick up ShortcutOverride events and
  consult a mapping of which shortcuts to use. We can use a smarter
  selection method to choose the more 'local' shortcut if two shortcuts
  that conflict exist.
2017-06-08 18:23:10 +01:00
baldurk 59977e47de Use GLSL highlighting for now on vulkan source files
* Later we should pipe through the source language from the SPIR-V and
  use that instead, for the other APIs it's just trivially HLSL/GLSL.
2017-06-01 11:28:38 +01:00
baldurk c7fb05744c Always display full tabs for file scintilla docks in shader viewer 2017-06-01 11:28:36 +01:00
baldurk 158bc4d583 Update code for new toolwindowmanager 2017-05-29 13:31:28 +01:00
baldurk 79a61c5700 Disallow docked panels in a shader viewer from becoming float windows 2017-05-19 14:44:32 +01:00
baldurk f6cef9ea4a Don't setFont(Consolas) - it's windows only. Fix monospace for scintilla 2017-05-17 15:55:42 +01:00
baldurk a6c77b5dee Give little tag structs unique names so we don't violate the ODR 2017-05-15 10:11:56 +01:00
baldurk ab432f24fc Implement the UI option for preferring monospaced font 2017-05-04 20:36:46 +01:00
baldurk 0b868e45c0 Explicitly set a fixed-width font for scintilla editors 2017-05-04 20:36:46 +01:00
baldurk 0ecc6ca877 Enable QT_NO_CAST_FROM_ASCII & QT_NO_CAST_TO_ASCII
* Added a couple of utility macros to help with the conversion. lit() is
  paired with tr() for untranslated text.
* QFormatStr is more explicitly for non-textual formatting strings.
* Both are just #define'd to QStringLiteral()
2017-05-02 22:58:12 +01:00
baldurk 9e5736f03e Add context menu popup for disassembly in shader debugging 2017-04-27 19:47:50 +01:00
baldurk a7e58ae5f6 Fix a broken loop condition 2017-04-27 19:47:50 +01:00
baldurk dd2f6eb88a Don't delete objects allocated in renderdoc module outside it. 2017-04-27 19:47:49 +01:00