Commit Graph

36 Commits

Author SHA1 Message Date
baldurk b8d10c4875 Help visual assist ignore/skip parsing generated SWIG code
* This didn't used to be as much of an issue but it seems
2021-05-18 12:29:20 +01:00
baldurk 7ff7e0a71d Replace fixed C arrays with wrapper class in public interface
* These map more naturally to python tuples and are easier to wrap in and out.
* We also tidy up the FloatVecVal etc and standardise the members of
  ShaderValue.
2020-12-09 18:16:08 +00:00
baldurk e2d47fa1a5 Fix compilation of PythonCaptureViewer 2020-12-03 21:14:13 +00:00
baldurk 1e1ac07a07 Allow python scripts to implement and register as ICaptureViewer classes 2020-12-03 10:44:27 +00:00
baldurk 36d74b32b9 Add optional output file for qrenderdoc unit tests 2020-06-11 20:06:43 +01:00
baldurk 8e21b28785 Split basic_types.h into separate independent headers 2019-12-16 17:05:11 +00:00
baldurk 06f2e61b8f Refactor RemoteHost to be copyable with shared storage
* This allows RemoteHost handles to still be valid and usable (if returning
  empty data) when they are deleted/removed if the device is disconnected, as
  well as providing better multi-thread access (they lock internally)
2019-07-31 17:51:12 +01:00
baldurk 67ba5f3ed1 Split extensions interface into separate header, add dialog box helpers 2018-10-24 12:22:54 +01:00
baldurk dd3a352408 Add registration and loading of extensions through a management window 2018-10-23 14:23:11 +01:00
baldurk 3c7b420e59 Expand SPIR-V disassemblers to general shader processing tools
* Instead of just configuring SPIR-V disassemblers and picking only the first
  one when we need to edit SPIR-V, we allow setting up any shader processor that
  goes between two shader encodings.
* When editing, the default will still be to use embedded source, and then after
  that the first tool that goes from the native shader format to a text format,
  but the drop-down allows you to pick any of them.
* Similarly in the shader viewer you can configure the compilation options and
  method, to choose the compiler you want to use. Embedded command line
  parameters in the shader are automatically appended.
2018-08-09 16:56:53 +01:00
baldurk 14e3a3d360 Move API-agnostic pipeline state wrapper into core interface
* There's no need for this to be in the UI, and moving it allows it to be used
  from script which is very useful.
2018-06-18 18:39:06 +01:00
baldurk bf70aeb64d Handle None being passed from Python for a QWidget pointer 2018-06-14 17:56:18 +01: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 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 417a811fad Expand docstring checks to also check names of symbols in the interface 2017-12-22 14:41:43 +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 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 53e669748e Add emulation of python list functions/interface in rdcarray bindings 2017-12-13 22:43:05 +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 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 8c74c92079 Move docstring check from fatal-onstart-hack to unit test run by CI 2017-10-02 15:54:23 +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 b70e897838 Change workaround for visual assist bug with large raw strings in macros
* The bug seems to happen if two raw strings concatenated together are
  large enough, so instead we pass them as separate parameters to a
  different macro then concatenate them inside the macro.
2017-08-16 16:29:56 +01:00
baldurk 09ba0b46af Add typemap for QPair 2017-08-03 17:57:24 +01:00
baldurk 87ef595cce For a block invoke to another thread, safe and restore
* In future we could handle async exceptions by storing the exception
  information in a std::function derived object (instead of the separate
  ExceptionHandling that lives on the stack) and query it out in a new
  WaitForInvoke function maybe. Right now we just print the exception
  to the output log and abort the callback.
2017-08-03 17:57:23 +01:00
baldurk 25c72714cd Fix errors to be more friendly when converting QWidgets in python 2017-06-22 14:20:19 +01:00
baldurk 0b1c3725b9 Add a fallback path for opaque qwidgets if pyside2 isn't compiled in
* Even if we don't have pyside2 to treat qwidgets as full objects and
  access their methods and data, we still need to be able to pass around
  the QWidget* as an opaque pointer to be able to use the API properly.
* This change falls back to just using SWIG's default opaque pointer
  wrapping and unwrapping when pyside2 isn't available.
2017-06-09 17:02:09 +01:00
baldurk 829e1aa77e Fix handling of 'slots' Qt keyword clashing with python
* On linux without any PCH we have a slightly different case to windows
  with the PCH, so we need to be careful not to redefine the macro.
2017-04-28 19:36:09 +01:00
baldurk 1f8a93c37a Add precompiled header file use to qrenderdoc on VS 2017-04-28 18:36:55 +01:00
baldurk 35f9c53486 Rename *Method to *Callback to be more explicit in the name 2017-04-18 14:57:48 +01:00
baldurk 494086f40d Rename RenderManager to ReplayManager 2017-04-18 14:57:48 +01:00
baldurk 35ae996a34 Check docstrings in the qrenderdoc bindings as well 2017-04-18 14:57:44 +01:00
baldurk 694d7b6c7b Split apart renderdoc.i for better organisation 2017-04-18 14:57:43 +01:00
baldurk 6f52ef5c68 Add support for passing QWidget * to/from PySide in qrenderdoc bindings 2017-04-18 14:57:43 +01:00
baldurk a77fecf44d Wrap BlockInvoke() calls with a helper function that releases the GIL
* This means that if we BlockInvoke a python callback, we don't end up
  in a deadlock where we're holding the GIL during script execution but
  also waiting on the renderer running (which is trying to acquire the
  GIL before calling the callback).
2017-04-18 14:57:43 +01:00
baldurk cbc27222e2 Add qrenderdoc python SWIG bindings, for the stable/clean interface 2017-04-18 14:57:43 +01:00