Commit Graph

68 Commits

Author SHA1 Message Date
baldurk 6b8ce92d88 Clean up docstrings in python interfaces to be strictly typed/formatted
* Also added a script that can run as part of CI to verify that the docstring
  matches, by generating a regex from the docstring documented parameter types
  and return type and making sure we find a match within the C headers. This
  ensures all parameters are documented with the right types, no extra
  parameters are documented, and the return type is correct.
* The script also checks proper scoping so that if qrenderdoc docstrings
  mention a renderdoc type, they need to scope it properly.
2020-12-07 17:44:51 +00:00
baldurk 0d1f6e3940 Add helper to invoke back onto the UI thread from the replay thread 2020-12-03 14:17:42 +00:00
baldurk a8a40ca3d6 Add the ability to create spacers, for better layouts 2020-12-03 13:24:56 +00:00
baldurk a176849962 Add some new helpers for managing widgets 2020-12-03 11:24:39 +00:00
baldurk 3f5a911483 Refactor CustomPaintWidget to handle widget recreation internally
* This allows us to expose to to python as a easy-to-use "replay output ready"
  widget.
2020-11-19 14:47:11 +00:00
baldurk 0aefcced95 Add a small interface into Qt widgets to our own python wrapping
* This by no means replaces PySide2, but it allows python extensions to write
  simple UIs without needing to rely on PySide2, which might not be available
  (generally all windows builds have it as well as recent binary linux builds,
  but local windows builds may not and most linux builds probably won't).
2020-11-18 18:21:20 +00:00
baldurk 806187f613 Save and load edited shaders as capture modifications
* When a shader edit is loaded with a capture, it's loaded as "pending" and not
  immediately applied.
2020-10-21 14:14:20 +01:00
baldurk 410df92bd7 Add function to connect to a remote host from python 2020-04-13 13:19:09 +01:00
baldurk 9ba81634b4 Improve the title of shader edit windows 2020-04-03 15:19:28 +01:00
baldurk 590785c470 Mark edited resources with an (Edited) suffix on their names 2020-04-03 15:19:28 +01:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 27098f8f70 Give our threads debugger-friendly names 2019-12-19 21:50:13 +00:00
baldurk db563bb0bf Refactor public interface around handling of textures
* Subresource handling is more consistent - we pass around a struct now that
  contains the array slice, mip level, and sample. We remove the concept of
  'MSAA textures count samples as extra slices within the real slices' and
  internalise that completely. This also means we have a consistent set
  everywhere that we need to refer to a subresource.
* Functions that used to be in the ReplayOutput and use a couple of implicit
  parameters from the texture viewer configuration are now in the
  ReplayController and take them explicitly. This includes GetMinMax,
  GetHistogram, and PickPixel.
* Since these functions aren't ReplayOutput relative, if you want to decode the
  custom shader texture or the overlay texture you need to pass that ID
  directly.
2019-11-26 17:38:25 +00:00
baldurk 20be9f3d52 Add ReplayOptions struct to contain replay-time configuration
* Not currently exposed to the UI or used by the drivers, we just pass the
  default object through
2019-08-27 18:51:56 +01:00
baldurk 93a546ab4b Remove extra dos newlines from scintilla editor. Closes #1493 2019-08-12 17:53:22 +01:00
baldurk 039b65f89f Add a viewer of the diagnostic log in the UI itself 2019-06-27 10:22:13 +01:00
baldurk 694524c7bd Allow querying the shader encoding supported by custom shaders
* This is distinct from target shaders in the remote proxy case - custom shaders
  are built locally.
2019-05-22 16:09:18 +01:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 317e89f7cb Add QIODevice::Text for text writing, to convert newlines. Refs #1246 2019-01-28 19:55:39 +00:00
baldurk dd3a352408 Add registration and loading of extensions through a management window 2018-10-23 14:23:11 +01:00
baldurk 5406227152 Call CreateWindowingData on the main UI thread
* This allows mac to patch-up the widget to be renderable, and has to happen on
  the UI thread.
2018-08-31 22:14:12 +01:00
baldurk 197a279e31 Add missing override specifier 2018-08-09 17:53:50 +01:00
baldurk a81e4a2b45 Pass through and allow different source shader encodings when editing
* This means e.g. the D3D11 back-end can accept DXBC directly if the UI can
  provide it, or compile from HLSL as before.
* More importantly, the Vulkan back-end can take SPIR-V compiled from any
  source, or compile from GLSL as before as a fall-back.
2018-08-09 16:56:52 +01:00
baldurk a4dfad6e82 Add a backend query to check shader encodings BuildTargetShader allows
* This will allow the backend to specify both the native format (e.g. SPIR-V,
  DXBC) as well as a language it might be able to internally compile (GLSL or
  HLSL).
* The caller will then able to decide for itself whether it wants to compile to
  native format and pass that down, or pass the language down and let it be
  built internally.
* Currently BuildTargetShader still only accepts shader source.
2018-08-09 16:56:51 +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 082ab4d75d GUIInvoke takes a QObject* to avoid callbacks after object lifetime
* The GUIInvoke object takes a QObject, and uses QPointer to check that
  it hasn't been deleted when the callback fires. This prevents delayed
  callbacks from executing after the object has been deleted and
  crashing.
* In most cases the pointer is just 'this'.
2018-05-08 11:54:34 +01:00
baldurk 2d0f675ca8 Add socket-based interop with RGP and profile embedding in captures 2018-04-25 19:10:51 +01: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 34fc993b59 Calculate column widths with devicePixelRatio 2018-01-16 20:12:06 +00:00
baldurk e7991c07eb Add ability to create a mapping from RGP linear/interopId <=> eventId 2018-01-11 16:44:57 +00:00
baldurk a6f856d2d9 Fix mistaken && insteasd of & checking control key modifier 2018-01-04 21:46:41 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +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 c8b2a5d488 Fix compilation issue with indexing QByteArray by sptr_t 2017-12-25 16:56:40 +00:00
baldurk 09db13ff3c Add a help lookup panel to the python script editor 2017-12-25 16:05:04 +00:00
baldurk a7398525b2 Add simple tab-completion in interactive python shell 2017-12-25 15:05:30 +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 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 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 602511bf33 Reduce parameters that need to be passed for viewing shaders 2017-11-22 19:11:27 +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 657c343ac8 Support multi-line input in the python shell 2017-11-20 20:01:02 +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 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