Commit Graph

244 Commits

Author SHA1 Message Date
baldurk f01dfbecc1 Add a python extension function to access picked location. Refs #2065 2022-05-31 11:26:59 +01:00
baldurk 3908082bd6 Improve python docstring checks
* We need to check for getsets having duplicate docstrings, and ignore
  docstrings being duplicated between members of different structs.
2022-05-20 14:15:30 +01:00
baldurk abe645f031 Add support for saving and loading structure definitions 2022-05-20 14:15:30 +01:00
baldurk 43fa3cd94b Use BufferViewer for viewing constant buffers
* Unifying these views means that constant buffers have all the same
  reformatting and it avoids having multiple paths for what is now effectively
  the same control (a buffer can either have fixed data, repeating data, or
  both)
2022-05-20 14:15:30 +01:00
baldurk 8aa0390948 Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a
  way of specifying a message to return with it. This message can be displayed
  to the user to give more information or context about an error.
2022-04-26 16:21:54 +01:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk f40e1fe951 Fix docstring references to ShaderSourcePrefix 2022-02-01 00:09:35 +00:00
baldurk 3ac4bd0ebd Refactor custom shaders to abstract binding differences. Closes #2458
* Newly written shaders and any updated shaders can now use pre-defined macros
  to abstract away binding differences between APIs, so custom shaders will be
  more portable in particular shaders written in HLSL for D3D or GLSL on OpenGL
  won't break on vulkan because they refer to incorrect binds.
2022-01-31 19:14:08 +00:00
baldurk 0620a8f114 Allow customising the fixed/monospace font as well. Refs #2443 2022-01-12 11:24:22 +00:00
baldurk 089126c34b Add a new in-app API function ShowReplayUI to raise the UI window
* This is not guaranteed to work, e.g. on windows where for good reason
  background windows can't necessarily raise themselves.
2022-01-12 11:24:22 +00:00
baldurk a0d40073ce Allow customising the font family. Closes #2443 2022-01-10 17:53:18 +00:00
baldurk 966ab0a738 Add command line option to qrenderdoc to run a script with the UI open 2021-11-17 15:52:52 +00:00
baldurk d4a5592780 Add functionality to reset an edited shader to original. Closes #2334
* We also add the ability to toggle on/off the replacement being active without
  needing to intentionally add a compile error (and this also makes it more
  explicitly clear when the shader replacement is enabled or not. This could be
  useful for quick A/B testing between the edited version and the original.
2021-11-02 14:09:50 +00:00
baldurk ee8c685880 Tweak docstring on performance counter viewer 2021-10-18 23:03:39 +01:00
baldurk 6dd63c6aec Convert counter viewer to item model, sync filter with event browser 2021-10-18 14:14:36 +01:00
baldurk ff40a98ac7 Specify stage for spirv-cross in case it's needed to disambiguate 2021-10-04 17:01:34 +01:00
baldurk 8ddc6eaa10 Fix docstring reference 2021-08-18 23:18:14 +01:00
baldurk 620e75c2a1 Add a system for backends to handle device lost/OOM errors and report it
* The UI will become non-functional and the backend will be replaced with a do-
  nothing one that keeps things alive without needing error bulletproofing
  everywhere in the real backend.
2021-08-18 20:12:07 +01:00
baldurk 100ccc9c65 Specify entry point when disassembling with spirv-cross. Closes #2342 2021-08-11 21:53:15 +01:00
baldurk d0accc409b Rename 'name' member of ActionDescription to 'customName'
* This is a deliberate break of compatibility since the field is now often
  empty, for non-markers. This means code will get a more explicit error when
  the name is being referenced, so it can be updated to fetch the name it needs
  as needed.
2021-07-01 15:15:05 +01:00
baldurk 7149302680 Rename 'draw' or 'drawcall' to action
* There's not a good accepted terminology for this kind of event, and for
  historical reasons 'drawcall' has been the accepted term, even though
  that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
  $draw() includes draws and dispatches, but $dispatch() only includes
  dispatches, it's hard to intuitively understand why $draw() matches all
  of these calls.
* As a result we've defined the term 'action' to cover these types of
  events in the same way that we defined 'event' in the first place to
  mean a single atomic API call.
2021-07-01 15:15:05 +01:00
baldurk 3d2101476e Add marker breadcrumbs to event browser. Closes #1031 2021-07-01 15:15:04 +01:00
baldurk ca3e3afa66 Add saving of filters
* The current filter is preserved across runs even if it's not explicitly saved.
  Saved filters are only updated with an explicit save - loading a filter then
  making a change just cahnges the current scratch filter, it doesn't update the
  saved filter until the user explicitly saves it.
2021-07-01 15:15:03 +01:00
baldurk c5457a141b Add settings popup that explains & documents filters 2021-07-01 15:15:03 +01:00
baldurk 6272683678 Remove event browser settings about hiding empty regions 2021-07-01 15:15:03 +01:00
baldurk cb7fdc9b94 Add auto-completion prompts for filter function parameters 2021-07-01 15:15:03 +01:00
baldurk 5dd3c95ee3 Add flags (not currently exposed in UI) for some different behaviours 2021-07-01 15:15:01 +01:00
baldurk dcaabf42e9 Allow python to register custom event filters 2021-07-01 15:15:01 +01:00
baldurk aecf687098 Change event browser model to be event-based 2021-07-01 15:15:00 +01:00
baldurk 51699a57b7 Fix python checks not properly running on enums, and fix new errors
* We whitelist a couple of cases where the naming scheme should be broken.
2021-06-08 16:34:52 +01:00
baldurk 2ddf567fec Require explicit opt-in to enable process injection on windows
* This option (in spite of large warnings) continues to be a pitfall for new and
  experienced users alike, trying to use process injection without good reason
  and getting into trouble when it breaks.
2021-05-24 16:51:43 +01:00
baldurk 331db5b4ba Fix custom shader edits to write the exact editor contents to disk 2021-05-17 13:47:58 +01:00
baldurk 5def7fd60d Fix further docstring typos 2021-05-11 18:36:46 +01:00
baldurk 3107cc5932 Fix typo in docstring 2021-05-11 18:16:11 +01:00
baldurk b4ec703d97 Expose shader printf messages in the UI 2021-05-11 16:15:31 +01:00
baldurk 4d16c3e44c Add function to close top level windows to MiniQtHelper 2021-01-27 16:05:03 +00:00
baldurk 1ce0958398 Add helper for setting images in labels 2021-01-15 12:36:14 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk fd1b051d2c Add helper for selecting sample mask, which varies in location by API 2020-12-18 14:05:54 +00:00
baldurk 539ea53b3c Fix python reference in docstring 2020-12-16 00:27:41 +00:00
baldurk f32008e95f Add access for changing the 3D preview stage in mesh viewer 2020-12-15 22:52:37 +00:00
baldurk afc9fc8f1e Fix verify-docstrings.py 2020-12-09 23:27:42 +00:00
baldurk 9d1673f5a4 Fix formatting in new docstrings 2020-12-09 22:55:48 +00:00
baldurk 466eecde1d Remove raw strings from persistant config settings
* This seems to break on GCC 5 unfortunately, and is certainly a bit of an edge
  case.
2020-12-09 22:19:36 +00: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 659fdaa235 Check that all complex struct members that have :type: in docstrings
* Ideally we'd document every member unconditionally for best autocompletion,
  but that's a lot of modification so for now we stick to just making sure that
  any members that are struct types (or lists/tuples) have the :type:
  declaration so that we can autocomplete inside them.
2020-12-09 15:18:27 +00:00
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 e5f4ca7bb8 Remove use of const char * in public API and OS specific where possible
* This prevents unnecessary conversions back and forth between rdcstr and const
  char * when going through interfaces. In the OS specific layer this is rarely
  an issue because most of the implementations don't convert to rdcstr, but it
  is convenient to be able to pass in an rdcstr directly. The few cases where
  there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
  function, so can't return an rdcstr due to C ABI, so they still return a const
  char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
  and because that's one place where unnecessary conversions/constructions may
  be impactful.
2020-12-07 17:44:50 +00:00
baldurk df6fec13f9 Remove use of automodule in docs
* One automodule in a file for our modules is way too much, so we split it into
  files. Unfortunately this means that only one file can have those classes and
  functions be linkable from elsewhere.
* Instead we bite the bullet and manually curate the items into pages, and at
  the same time subdivide the 'enums and data' page more which is a general
  readability and usability win as well.
* We also add some previously not-included functions, and add a doc-build time
  check to ensure that functions and classes aren't omitted from the
  documentation in future
2020-12-07 17:44:50 +00:00
baldurk 6f7e8bb396 Add python interface consistency check that we don't use non-class enums
* These enums are generally not preferred anyway, but they also can't have
  docstrings so can't be checked for *missing* docstrings.
2020-12-05 09:57:40 +00:00