Commit Graph

936 Commits

Author SHA1 Message Date
baldurk b992e95f94 Update replay proxy to use new serialisation mechanism 2017-11-07 19:30:36 +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 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 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
baldurk 9db71b803a Change python wrapping of arrays to be more pythonic, by reference
* Previously we would convert from python to C++ arrays immediately by
  copying, and vice-versa convert TO python immediately by creating a
  new python list by copying.
* This however behaves rather poorly in common situations, e.g.:
  > foo.bar.append(5)
  Would not append 5 to foo.bar, but copy foo.bar to a temporary, append
  5 to it, then destroy it leaving foo.bar untouched.
* Instead we leave the C++ array type as a pointer for as long as we can
  and instead implement the python sequence API as extensions/slots that
  work in-place on the original array.
2017-11-03 16:19:41 +00:00
baldurk eb7e14d46d Add a formatter for 64-bit integers 2017-11-03 16:13:29 +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 0ae61ea088 Fix translation string being incorrectly split 2017-11-03 15:54:06 +00:00
Janos Pantos 1fbcab67a0 Disable change events of mipLevel and sliceFace when switching textures
Otherwise, bad texture queries may occur, which refer to mip and slice
values of the previous texture.
2017-11-03 16:22:31 +01:00
baldurk 8639e616cf Don't divide by zero if there are no textures to fetch stats for 2017-10-27 17:50:12 +01:00
baldurk 0d7a064443 Right align both durations in event browser and perf counter data 2017-10-27 12:26:02 +01:00
baldurk 6b230d8de0 Use float formatter for duration column in event browser 2017-10-27 12:26:02 +01:00
baldurk 62260a6404 Add column alignment function to RDTreeWidget 2017-10-27 12:26:01 +01:00
baldurk 1e41875479 Clamp currentIndex from Qt which can come back as -1 in some cases
* If this gets propagated far enough and used as an index it can cause
  crashes, so we clamp to 0 when we know the value should be
  non-negative.
2017-10-24 12:56:31 +01:00
baldurk b83daddbad Bounds-check access to vertex buffers, in case not enough are bound. 2017-10-23 15:52:45 +01:00
baldurk 42abaf2b4f Prefer using VK_AMD_shader_info to disassemble when available. 2017-10-23 15:05:29 +01:00
baldurk fbf37fd201 Convert to native separators before passing filename to Win32 APIs 2017-10-23 15:01:02 +01:00
Cory Bloor 860eeace4c Cleanup Help menu actions 2017-10-23 14:27:24 +02:00
Cory Bloor bd994848e1 Improve docs for picking Qt version on Linux 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 405e98639f Parse getSaveFileName filter for default file exts
Instead of manually specifying the default extension, just grab the
first one from each filter. We can only specify one at a time, so
update it whenever the selected filter changes.
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 8986596350 Make "Recent Capture Settings" update upon save 2017-10-11 03:26:17 -07: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 4cd36280e8 Fix string comparison being the wrong way around on input bytecode check 2017-10-05 12:03:29 +01:00
baldurk b66d11086c Remove a TODO that's already been implemented 2017-10-02 15:54:53 +01:00
baldurk 8c74c92079 Move docstring check from fatal-onstart-hack to unit test run by CI 2017-10-02 15:54:23 +01:00
Marton Tamas a018deb19f added pvrtc support 2017-09-29 12:11:16 +01:00
baldurk 3d11c502f5 Don't use SWIG_BUILTIN_INIT for passing SWIG ptrs, use SWIG_POINTER_OWN
* The former is only needed inside tp_init of a new object. Instead when
  we want to pass in and own a pointer, we use SWIG_POINTER_OWN.
* This also removes the need to pass 'self' all the way down in
  ConvertToPy which tidies up a lot of code.
2017-09-29 12:11:15 +01:00
baldurk 4a3af3e67f Let TypeConversion function handle checking input object type
* This means e.g. when we're converting a `bytes` we don't bail when it
  isn't a list.
2017-09-29 12:11:15 +01:00
baldurk 90aedf58e6 Don't error if calling ConvertToPyInPlace on bytes object 2017-09-29 12:11:15 +01:00
baldurk e88f00d7c7 Remove argout typemap as it's no longer needed and applies wrongly often 2017-09-29 12:11:15 +01:00
baldurk 6759d975b0 Add conversion typemaps for fixed-size arrays in python 2017-09-29 12:11:14 +01:00
baldurk 6082c7da55 Remove use of bool32 in CaptureOptions struct. 2017-09-29 12:11:14 +01:00
baldurk 1992183e8e Add support for specifying a subfolder under the lib/ target. Refs #750
* This allows a buidler to customise from e.g. /usr/lib/librenderdoc.so
  to /usr/lib/renderdoc/librenderdoc.so - which is harmless since the
  library is 'private' and not intended to be linked against directly.
2017-09-26 11:00:17 +01:00
baldurk bf3214e8a2 Don't display a register/slot index for built-in shader variables 2017-09-19 17:28:12 +01:00
Matthäus G. Chajdas cad64db864 Use the correct role instead of a magic number. 2017-09-15 12:18:22 -07:00
michaelrgb 06cfd5383f Save in app's own /sdcard directory, doesnt need WRITE_EXTERNAL_STORAGE.
Removed checks for WRITE_EXTERNAL_STORAGE from Android workflow.
2017-09-15 12:17:02 -07:00
baldurk 4e092940fc Fix formatting of string to not append an int interpreted as a QChar 2017-09-13 14:49:42 +01:00
baldurk aabea30012 Add alpha2coverage to VK state view, move it & alpha2one to MSAA group 2017-09-13 14:24:48 +01:00
baldurk 7259f9a04a Check samplers array for resources in descriptor sets too 2017-09-13 14:16:29 +01:00
baldurk cb644313db Don't select unused bindings over a valid bind in vk pipeline state
* If there's a variable which is unused and has no binding declared, it
  will be sorted to the end of the list and given a binding of 0. We
  don't want to let this override a valid binding for 0, so make sure we
  prioritise any variable which is marked as used over one that is
  unused.
2017-09-13 14:16:15 +01:00
baldurk ac62a124a5 Don't try and look up the descriptor for push constants in pipe export 2017-09-13 12:30:38 +01:00
baldurk 329f06eb50 Immediately delete any open LiveCapture windows when closing 2017-09-13 12:30:37 +01:00
baldurk 80ec87fdd2 Pass -rdynamic to qrenderdoc link, ensures replay marker sym is exported 2017-09-11 20:23:56 +01:00