Commit Graph

106 Commits

Author SHA1 Message Date
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
Cory Bloor b7eb5c6516 Implement "Clear History" for Recent menus
This also fixes a couple minor related bugs in the menu.
2017-10-11 03:26:17 -07:00
Cory Bloor 6f21bacd82 Set default extensions for most save files
In most of these cases, the open file dialog won't even display a file
without the proper extension, so this helps ensure the user doesn't
accidentally misplace their files. The one exception is *.rdc, which
could be found without the extension, but could not be opened.
2017-10-11 03:26:17 -07:00
baldurk 329f06eb50 Immediately delete any open LiveCapture windows when closing 2017-09-13 12:30:37 +01:00
Matthäus G. Chajdas 03343239c7 Implement a Performance Counter Viewer pane, hook up selection dialog 2017-08-24 13:21:03 +01:00
Matthäus G. Chajdas 29376f34cc Add a performance counter selection dialog. 2017-08-24 13:21:01 +01:00
baldurk e85c8d19bf Combine 'special' with 'specialFormat' as single resource format type
* There was no good reason to have a flag indicating if the special
  format was valid or not. Now it's a single enum, with a value
  'Regular' indicating that the compCount/compWidth/compType fully
  describe the format itself.
* This makes code patterns easier as you no longer need to check for
  special then check for specialFormat, you can just test the type
  directly.
2017-08-24 10:37:16 +01:00
baldurk 43ac48a493 Don't use event browser as area reference if it's not visible.
* Fixes a crash opening the API inspector if the event browser was
  closed.
2017-08-21 15:43:20 +01:00
baldurk 4c24b0f28f Remove use of ToQStr to convert rdctype::str to QString 2017-08-18 14:13:22 +01:00
baldurk a6f0d07e09 Remove most stylesheet use as this messes with a custom style
* Use palettes where a certain colour is needed.
* Still need some solution for table borders in grid layouts
2017-07-28 19:06:44 +01:00
baldurk 1cda979d8f Clear QPixmapCache if style/palette changes (Qt should do this really) 2017-07-28 19:06:43 +01:00
baldurk 26711eca2e Use MainWindow palette for tooltips 2017-07-28 19:06:41 +01:00
baldurk 806876c540 Add a menu item to do nothing but replay the capture in a tight loop. 2017-07-27 16:14:17 +01:00
baldurk d3d1bcd136 Add work in progress timeline bar
* Has an EID scale bar along the top, and simple zoom/pan, but nothing
  else.
2017-07-13 18:44:41 +01:00
baldurk 0032a11fc2 Implement global hook feature for Qt 2017-07-12 13:54:12 +01:00
baldurk 628e6481d5 Distinguish between friendly and real hostnames for remote hosts
* This means we don't pass a friendly hostname internally to connect to,
  and we don't display a hostname where we want a friendly hostname.
2017-06-19 16:17:20 +01:00
baldurk d44528794a Change qrenderdoc icons to Farm-Fresh, to add high-DPI versions. 2017-06-19 16:17:20 +01:00
baldurk 6423a82d18 Add support for multiple connected android devices
* We forward a different range of ports to each device so we can pick
  and choose which to communicate with based on its index.
* The index is encoded in the 'hostname' like so: adb:X:deviceidhere
* Whenever we want to interact with an android device we always specify
  the device, never leave it to a default.
2017-06-15 05:28:07 -07:00
baldurk c76b8298f8 Use adb getprop to give adb devices friendly names
* This means you'll see "Google Pixel XL" or "samsung SM-G900F" instead
  of "HT74T0200775" or "9a9502c6"
2017-06-15 05:28:07 -07:00
baldurk d19ba7eadc Make sure temporary logs opened from the command line are cleaned up 2017-06-13 18:13:31 +01:00
baldurk 8a59754bf8 Disable save/close capture menu items when there's no capture open 2017-06-08 18:23:23 +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 2f1301e758 Settle on consistent 'capture' name for captured files, dropping 'log' 2017-06-08 16:35:14 +01:00
baldurk 158bc4d583 Update code for new toolwindowmanager 2017-05-29 13:31:28 +01:00
baldurk 6c2f2c0401 Rename "Capture Executable" to "Launch Application" & add to window menu 2017-05-09 17:28:38 +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 ae50fa99ee Revamp version tagging, remove ugly suffix on git hash. Refs #571
* Tacking -official onto the git hash was a hack only needed on windows,
  and since we want more information it doesn't scale.
* Instead we track anything we need to know about the version in
  separate variables, like whether it's a stable build or a nightly/
  local build. Or if it's built by a downstream distribution then the
  version number for the downstream build.
2017-04-27 19:47:50 +01:00
baldurk 2eb4a35680 Add a refcount to RemoteManager so it only closes when unused
* We previously were only checking if all lookups had completed before
  self-deleting, but we also need to make sure nothing externally is
  still holding onto the dialog.
2017-04-19 18:29:10 +01:00
baldurk 2a4596e06a Add python shell qt window 2017-04-19 18:03:19 +01:00
baldurk 494086f40d Rename RenderManager to ReplayManager 2017-04-18 14:57:48 +01:00
baldurk 6930841705 Rename ReplayRenderer to ReplayController
* It's not a renderer, it's an interface to controlling the replay and
  any 'renderer' type work actually happens in ReplayOutput.
2017-04-18 14:57:47 +01:00
baldurk a7ab0d9300 Move capture-file handling functions into a single interface
* This allows us to return complex types like byte arrays or pairs of
  status & render handle.
* Also in future more introspection of the capture file will be possible
  and this provides an easy extension to that without adding new entry
  points.
2017-04-18 14:57:47 +01:00
baldurk bc79e2296f Make EnvironmentModification struct and pass around array directly
* The old 'store in opaque void*' is kept as entry point wrappers only
  for the C# UI.
2017-04-18 14:57:47 +01:00
baldurk f6c045f473 Refactor public interface to be less strict C and more python friendly
* Generally this means removing ref out parameters and instead returning
  values. In a couple of cases we will want to avoid copies in future
  either by returning const references (e.g. to the pipeline state which
  is immutable).
* At the same time, some pointless bool return values that were always
  true and didn't indicate errors have been removed. They can be added
  again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
  allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
  handle taking the return value and doing a copy into an out parameter
  still for compatibility.
2017-04-18 14:57:46 +01:00
baldurk 094c4164dc Refactor qrenderdoc to provide stable, clean and deliberate API
* Note, this API is still in-flux and beta, so there may still be some
  more changes before it's 'stable', and even then it will still be
  subject to some amount of change.
* This API is then exposed to python via SWIG bindings and hides
  internals that don't need to be visible, and means the actual API is
  easier to work with.
* We also use this API to reduce inter-dependencies between different
  windows that need to interact with each other at a high level.
* The naming is python/standard RenderDoc TitleCase method names, not
  Qt style camelCase methods.

# Conflicts:
#	qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp
#	qrenderdoc/Windows/TextureViewer.cpp
2017-04-18 14:57:43 +01:00
baldurk 3e74683a70 Fix qrenderdoc compilation on Win32 2017-04-18 14:57:40 +01:00
baldurk d40fc8471d Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also
  reflects better for SWIG bindings. Overall it's a minor change but
  better.
* We don't update the C# UI at all, since it's soon to be removed and
  not worth the effort/code churn.
* For now so we're ABI compatible with C#, all enums are uint32_t, but
  that is an obvious optimisation in future to reduce struct packing.
* We avoid 'None' as an enum value, because it's a reserved word in
  python so will cause problems generating bindings.
2017-04-18 14:57:33 +01:00
Dimitris Kapnopoulos d3faa58a78 Added Tips Dialog. Changed Tips_SeenFirst to Tips_HasSeenFirst 2017-03-21 04:09:47 -07:00
baldurk c89bcfbb7a More robust isolation of the git commit hash, without special cases 2017-03-10 13:27:59 +00:00