244 Commits

Author SHA1 Message Date
baldurk 2d0f675ca8 Add socket-based interop with RGP and profile embedding in captures 2018-04-25 19:10:51 +01:00
Baldur Karlsson 8de1bcce90 Set pixmap device pixel ratio when creating empty version 2018-03-13 12:49:18 +00:00
Baldur Karlsson 68a3f3a31f Filter out previous/next drawcall shortcuts when text editing.
Closes #911

editing.
path.
'ad0678a'.
2018-03-12 15:46:44 +00:00
baldurk 0b3026346f If an update check is *not* due, then don't do the check 2018-03-05 19:44:35 +00:00
baldurk 2c57d06acb Fix reported bugs handling - add icon to help menu, save unread updates 2018-03-05 16:44:19 +00:00
baldurk 6221c2fba8 Implement menu item to clear reported bugs list 2018-02-26 15:42:33 +00:00
baldurk d9c7a4d416 Show the status bar progress indicator if a replay operation is slow
* This mostly happens on android where there are large framebuffers
  transferred over a very slow USB connection
2018-02-22 15:49:48 +00:00
baldurk 13c1cf6ad4 Return ReplayStatus when launching/injecting, use to indicate JDWP error
* If android studio or other android tools are open when a package is
  launched for debugging, they greedily jump on it and connect which
  prevents us from connecting.
2018-02-20 11:54:57 +00:00
baldurk 934800793a Improve workflow for capture import/export
* If the export doesn't need buffers, we export directly from the loaded
  capture file instead of re-loading it.
* Add progress bars for the load step so it shows what's happening
  instead of looking stalled.
* Reduce compression rate on XML+ZIP buffers as it took too long trying
  to compress when exporting large captures.
2018-02-19 00:52:13 +00:00
baldurk eaa57f3e11 Add UI menu for importing from/exporting to other formats. 2018-02-12 20:48:00 +00:00
baldurk 79f3f54b84 Add a spinner progress bar while running remote server command 2018-01-26 21:19:15 +00:00
baldurk 65ef82466c Re-organise Analytics structures a bit to be more processing friendly 2018-01-19 13:57:02 +00:00
baldurk dea21b20a0 Remove global GIT_COMMIT_HASH define, use GitVersionHash global var
* On windows, the change in a global GIT_COMMIT_HASH define in each
  project needing it meant a full rebuild every time the commit changed.
* Ideally we'd set the define only on one file in each project, but
  MSBuild doesn't seem to support that. Instead we make a new tiny
  project that compiles a single cpp exporting a global var, and
  reference that global var in each other project.
2018-01-16 20:17:53 +00:00
baldurk dc98914eef Don't add android hosts synchronously in menu popup (it started slowing)
* This was fast before but I started noticing the lag. Instead, we can
  do it asynchronously when polling for remote host status, every few
  seconds. This should still be good enough as people are probably going
  to be used to devices taking a moment to appear.
2018-01-11 13:48:33 +00:00
baldurk e3ead220f6 Refresh list of android hosts whenever context switcher is opened
* It's very fast, and means we update whenever a device is plugged in or
  unplugged.
2018-01-02 15:50:22 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 7a2305ae31 Change by-ref passed float or bool parameters to callbacks in public API
* Mostly used for passing a progress float back during a long blocking
  call like opening a capture or doing a copy.
* This is much more feasible for python to bind to.
* In several cases we just use a tiny lambda that updates a float anyway
  since we can't push the progress directly into a progress dialog, but
  need to let it query from a temporary in-between float.
2018-01-01 17:31:23 +00:00
baldurk beaa642f73 Remove bool parameter to InitResolver to cancel resolving 2018-01-01 17:31:20 +00:00
baldurk 6572cd97f5 Tidy up handling of windowing data, make it a bit more type safe 2018-01-01 17:31:19 +00:00
baldurk 29e95d193c Remove accidentally committed macro change for debugging update checks 2017-12-27 16:05:15 +00:00
baldurk 21d5943d82 Remove dependency on Qt in qrenderdoc python module
* The main addition here apart from some extra stubs is a new rdc type
  for date time objects.
* Although the module doesn't do anything and is only used for docs
  reflection it is desirable to not have to link against Qt as this
  can cause problems when linking the module without unresolved symbols.
2017-12-27 16:05:15 +00:00
baldurk 9c7e46c6fc Tweak update menus and alerts
* We split the "update available" off to a top-level menu item, instead
  of a sub-item under Help. This gives explicit text saying an update is
  available.
* Change the icon from an hourglass to a slightly more 'updatey' image.
* We now re-cehck every week even if an update is marked available. That
  way people who delay for longer than it takes to release a new version
  will get the latest when they do update. It also gives them a reminder
  every week so that hopefully those delayers will be less common!
2017-12-22 14:41:45 +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 7f20040105 Add timeline bar to default layout 2017-12-21 11:10:50 +00:00
baldurk 764b39a23c Add update checking system to Qt UI
* This only runs on windows - on other platforms we rely on system
  distribution or user local builds.
2017-12-19 17:31:32 +00:00
baldurk f2e7f8f1a0 Refactor crash/bug reporter system
* The UI dialog is now in Qt. We run qrenderdoc.exe with a very minimal
  startup to display the dialog and send the report.
* The flow has been simplified to have less text and an easier time to
  just click through and send.
* On the first report, the user is gently nudged to enter their email
  address for contact and by default the email is saved for next time.
  They're not nagged more than once about this.
* Optionally the user can select to upload the capture. This is always
  default off, and there is a confirmation dialog making sure the user
  intended to select it.
* After the bug is reported, a unique URL is generated and returned
  which the user can then click back on to see if there's any update. By
  default the UI will also remember the URL and check it every couple
  of days and alert the user in the help menu that there's an update.
2017-12-19 12:26:34 +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 e189ae030c Remove the need for a preceeding / on android (Allow empty root path) 2017-11-29 19:01:23 +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 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 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
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 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 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 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 200f0799a4 Generate clickable links to resource inspector in RDTreeWidget 2017-11-17 16:30:56 +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 82e1218b62 Defer loading .rdc from drag & drop, to unblock the calling application 2017-11-10 18:36:08 +00:00
baldurk 136909eaad Raise capture dialog when an .exe is dropped on the window 2017-11-10 18:36:08 +00:00
baldurk 3c2a486d6a Use application-level event filter for handling shortcut redirects
* If we just filter the main window, it won't properly pick up shortcuts
  used in floating windows.
2017-11-10 18:36:03 +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 2c2270051c Hide/disable options when they're not available. Refs #788
* Hopefully these can be restored at some point, when the features are
  implemented. For now where possible we remove options that are just
  unavailable always, and selectively disable others when they may or
  may not be available based on what API the capture uses.
2017-11-06 12:45:40 +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
Cory Bloor 860eeace4c Cleanup Help menu actions 2017-10-23 14:27:24 +02:00
Cory Bloor 2fc8475fdf Replace "All Files (*.*)" with "All Files (*)"
To quote the Qt documentation for QFileDialog::setNameFilters:

> Note that the filter *.* is not portable, because the historical
> assumption that the file extension determines the file type is not
> consistent on every operating system. It is possible to have a file
> with no dot in its name (for example, Makefile). In a native Windows
> file dialog, *.* will match such files, while in other types of file
> dialogs it may not. So it is better to use * if you mean to select
> any file.

Admittedly, one of these usages is Windows-only and we are using the
native file dialog there, but we might as well be consistent.
2017-10-23 14:27:24 +02:00
Cory Bloor 427b7f8553 Revert "Set default extensions for most save files"
This reverts commit 6f21bacd82.
2017-10-23 14:27:24 +02:00