Commit Graph

371 Commits

Author SHA1 Message Date
baldurk b3e48a7576 Add search logic to find android tools automagically, which we ship
* We search first in specified folders by the user (they can browse to
  the android SDK and java JDK).
* If the tools we want aren't found there, we look relative to the UI
  as we now distribute the required tools with windows builds.
* If we still don't find them, we prefer to look in PATH since the user
  has 'opted in' to any tools found in there. If the tool isn't in PATH
  either then we look relative to known environment variables.
2017-12-14 14:38:39 +00:00
baldurk 53e669748e Add emulation of python list functions/interface in rdcarray bindings 2017-12-13 22:43:05 +00:00
baldurk a75a036a12 Add operator== and operator< to many interface structs
* This will enable the last few python list emulation functions, like
  index (which needs operator== to find objects) and sort (which
  obviously needs operator< to sort).
2017-12-13 22:43:03 +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 606660b4e2 Add analytics boolean that tracks if bundles are used in D3D12 2017-12-11 17:49:05 +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 dde3a21e67 Add helpers for constructing structured objects from primitives/QVariant 2017-11-29 19:01:21 +00:00
baldurk 24ef5807e7 Ignore new append function in SWIG 2017-11-27 20:59:41 +00:00
baldurk 01e2e00b5f Add error checking and handling while loading captures
* Previously once we started loading a capture we'd blindly continue
  until we loaded it (and then it's assumed to be successful), or we
  crash.
* Now errors can be reported during serialisation and bubbled up to
  abort the file load process. The next steps are to add error checking
  in each function serialise before doing any replay calls to the API
  with potentially corrupt data, and on top of that catching API-only
  errors when the serialisation is (seemingly) fine, and propagating
  those in a reasonable way.
* We also harden the serialisation a bit so that if it reads an
  obviously invalid byte length for a buffer or array count, it won't
  continue. It's still not perfect as the sizes could still be large and
  invalid but within range, but it should catch the worst cases.
2017-11-24 18:14:21 +00:00
baldurk 5564e8b263 Open shader source from resource inspector 2017-11-22 19:11:28 +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
baldurk e75a468d3c Remove direct include of Code/CaptureContext.h in almost all files
* This is a leftover from before the interface was hoisted out, and most
  windows were still calling directly to CaptureContext instead of via
  the public ICaptureContext interface
2017-11-22 19:11:20 +00:00
baldurk 203f6b5255 Silence some warnings about casting from one enum type to another
* Reported by Coverity Scan - I don't think any of these were actually
  a problem since the enum definitions all matched.
2017-11-22 19:11:19 +00:00
baldurk c860d8baa3 Fix uninitialized variable warnings from static analysis
* Reported by Coverity Scan
2017-11-22 11:31:07 +00:00
baldurk 05d7ae9fec Update QProcessInfo files to 9aecbbe2c45dd259c50b70b52d1386f7592bf0ad 2017-11-22 11:17:49 +00:00
baldurk 8fb7620678 Don't print 'internally encoded' resourceid, manually fetch ID out 2017-11-21 19:10:33 +00:00
baldurk a13902fe2f Make sure RichResourceText never wraps, and just clips instead. 2017-11-21 16:56:46 +00:00
baldurk 17c2eb37ef Accept a const QWidget* in RichResource functions 2017-11-21 16:56:32 +00:00
baldurk bb5ae999f5 Vertically align RichResourceText painting in the centre with margins 2017-11-21 16:55:58 +00:00
baldurk 32a74e20e1 Extract out most code for text-with-ResourceId-links from RDTreeWidget
* The RDTreeWidget items still use this code, but it can now be reused
  on other widgets like RDLabel.
2017-11-21 14:45:22 +00:00
baldurk 134f7c8ffe Enforce python bindings rdcarray instantiations, and add missing ones 2017-11-20 20:01:03 +00:00
baldurk b8777b3f82 Update to use latest renderdoc SWIG fork, with new improvements
* Enums are now proper python enums instead of just being a class with
  static int members.
* Fix a refcounting issue with SWIG generated code to access nested
  child structs.
2017-11-20 20:01:02 +00:00
baldurk 657c343ac8 Support multi-line input in the python shell 2017-11-20 20:01:02 +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 c4207fbd5b Add a missing enum docstring 2017-11-17 17:52:21 +00:00
baldurk 016bc29609 Add a tool menu item that will recompress a capture file 2017-11-17 16:33:05 +00:00
baldurk 4a4089f316 Add generic user-provided notes to save along with the capture.
* In future one of the notes items would be for gathered hardware info.
  Not automatically, but with one button press the full configuration
  can be embedded.
2017-11-17 16:31:03 +00:00
baldurk 19974e1771 Move bookmark storage centrally and save it with capture. Refs #501 2017-11-17 16:31:03 +00:00
baldurk c00a6ca8ef Add notion of UI modifications to a capture, saved in .rdc sections 2017-11-17 16:31:01 +00:00
baldurk bb6452c334 Expand IStackResolver into ICaptureAccess to allow section read/write 2017-11-17 16:31:01 +00:00
baldurk 0b899d90b6 Add ability to replace sections in RDCFile 2017-11-17 16:30:59 +00: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 e399365ba2 Add simple utility functions for serialising QVariantMap to/from JSON 2017-11-17 16:30:57 +00:00
baldurk 200f0799a4 Generate clickable links to resource inspector in RDTreeWidget 2017-11-17 16:30:56 +00:00
baldurk 25de6726f6 Add some cross-linking for panels that view a single resource
* We add a button with a link icon to indicate that it goes to the
  resource details. We'll re-use the crosshair as a visual metaphor for
  any interactive widget that goes to the resource inspector.
* To remove any possible confusion, we change the icon for the texture
  list and locked tabs in the texture viewer to not include the link.
2017-11-17 16:30:54 +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 d009ed3b30 Add a resource inspector window for viewing resource details 2017-11-17 16:30:52 +00:00
baldurk bace05d926 Split out code to populate RDTreeWidget with structured data 2017-11-17 16:30:51 +00:00
baldurk 60e530de88 Split out utility function to group together resource usage events 2017-11-17 16:30:51 +00:00
baldurk 152abc501a Fetch structured file on capture load so it's available persistently 2017-11-17 16:30:50 +00:00
baldurk 79b51591c2 Add ForwardingDelegate for use in RD extended widgets.
* This item delegate will forward on either to a specified other
  delegate or to the base implementation. This allows chaining delegates
  (i.e. having one built-in to the widget, which forwards to a user-set
  delegate).
2017-11-17 16:30:47 +00:00
baldurk 82e1218b62 Defer loading .rdc from drag & drop, to unblock the calling application 2017-11-10 18:36:08 +00:00
baldurk 988121ee65 Display generic mesh input attrs, and add ---s for out of bounds access 2017-11-10 18:36:04 +00:00
baldurk 9388d2b71b Change core capture code to be more centred around container handle
* When opening a capture file, a format is now available to allow
  easy import from another format without a completely different
  interface. Only rdc files can be replayed, but any other file can
  load and access structured data through the same interface.
* The replay initialisation and capture writing interfaces also use the
  RDCFile instead of passing filenames or Serialisers around directly.
  Driver initialisation parameters are now entirely private, and don't
  need to be exposed - any agnostic metadata like thumbnail, driver, etc
  are all accessed via the RDCFile container itself.
* Callstack resolution is now part of the container file, not the
  back-end via way of its Serialiser.
* Importers/Exporters to other non-RDC formats are registered in a
  similar way to replay/remote drivers.
* It is also then possible to construct an RDC file from thin air, by
  creating an empty RDCFile container and filling it with data, then
  requesting it to be written to disk.
2017-11-07 19:30:35 +00:00
baldurk 327fda94a0 Add refactored serialisation system
* The new system contains the ability to export serialised data to a
  structured form in memory - and conversion back to serialised bytes.
* This will allow offline transformations/visualisation of capture files
  as well as more rich representations of API calls in the UI.
* Likewise it enables a number of optimisations such as the ability to
  write straight from mapped API memory to disk via a compressor,
  without any intermediate copies.
2017-11-07 19:30:32 +00:00
baldurk dfbb567464 Update qprocessinfo to 39678d76bd9b462da9acbfea397dd56494aab73e 2017-11-06 12:45:40 +00:00
baldurk 3aa3262089 Expose ToStr interface publicly, split out into separate files
* Note that while this is public and uses std::string, because it's a
  template with specialisations in a .inl the string never crosses a
  module boundary - each including module has its own implementation.
* This will be used as part of the upcoming serialisation refactor.
* Some POD structs are still given ToStr implementations as we haven't
  yet switched over the serialisation system to expect all structs to
  have serialise functions.
2017-11-03 16:23:02 +00:00
baldurk 6937756618 Add new structured data, that will be used to expose serialised values
* We have some special handling to allow SWIG wrapping of these types:
  SDFile owns the chunks and buffers within, and each object owns its
  children. Copying is disallowed except from SWIG where we assume the
  wrapper is handling lifetime management for its objects externally.
2017-11-03 16:19:45 +00:00