Commit Graph

746 Commits

Author SHA1 Message Date
baldurk 90ced90a89 Add common pipeline state helper to grab stencil face states 2020-12-15 22:52:37 +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 580f96c8a1 Rename ShaderVariableType/Descriptor to ShaderConstant
* These structs are no longer used with ShaderVariable so the name is misleading
  at best.
2020-12-09 15:18:27 +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
baldurk ced7fc70cd Bump version to 1.12 2020-11-27 17:32:26 +00:00
baldurk 883000009d Ensure ResourceId declares all operators
* This improves things in the MSVS debugger which otherwise sometimes complains
  of no suitable copy constructor for ResourceId
2020-11-20 17:02:33 +00:00
baldurk d0bf0f6eab Add Superluminal PerformanceAPI annotation support 2020-11-19 14:47:10 +00:00
baldurk dc957b4c5c Fix typo and clarify AlphaMapping use. Closes #2090 2020-11-12 10:58:32 +00:00
baldurk b21f9da85a Add helpers for dispatching in bit-width-agnostic ways 2020-11-09 12:25:21 +00:00
baldurk 3d46e105a3 Compile fix on some compilers 2020-10-28 14:14:42 +00:00
baldurk 03b7229bad Support choosing multiview viewport in vertex debugging on vulkan 2020-10-28 13:34:08 +00:00
baldurk 6b67a6c13b Fix proxy serialisation of SDObject to set parent pointer correctly 2020-10-28 11:56:38 +00:00
baldurk 978d240ec6 Compile fixes 2020-10-28 09:41:54 +00:00
baldurk 6fbd8511bb Store parent pointer in SDObject 2020-10-27 15:15:20 +00:00
baldurk 7830f56689 Return string literals for more bitfield values
* If a bitfield is precisely equal to one known value, return a literal for it.
  Similarly for 0, for both bitfields and regular enums. This helps reduce the
  number of heap allocated strings generated while serialising.
2020-10-27 15:15:20 +00:00
baldurk 935cb113ed Add new string type rdcinflexiblestr specifically for structured data
* This is a string type which heavily optimises for immutability and minimal
  storage. It only contains one pointer to the string data and always
  reallocates on modify. For compile-time literals it doesn't modify or
  allocate.
* On x64 we use the top bit in a tagged pointer to store a flag of whether it's
  heap or literal, on other platforms it uses a separate field (meaning another
  pointer sized value effectively, including padding).
* This is best for structured data which tends to use a lot of immutable strings
  for type/name information, and only a few for actual string data (which are
  only allocated once and aren't modified after that). Similarly we rarely want
  to know only the size of any of these strings, we want the whole string so not
  explicitly storing the size is not a big deal.
* Overall this reduces SDObject from 128 bytes to 80 bytes.
2020-10-27 15:15:19 +00:00
baldurk c58f3edafa Support lazy-generating structured data objects for large arrays
* For certain very large arrays it can be nice to defer generation of structured
  data until it's needed, since often maybe only a handful of elements may be
  needed (or commonly none at all).
2020-10-27 15:15:19 +00:00
baldurk 394896a3c9 Hide list of children completely in structured data
* This makes it easier to enforce object ownership, as well as gives us options
  for e.g. generating structure data on demand lazily.
2020-10-26 10:24:47 +00:00
baldurk 57aca86c98 Remove unused and redundant numChildren union member in SDObjectPODData 2020-10-23 14:19:13 +01: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 90437b3a65 Fix return of only dynamically used resources
* If the range wasn't contiguous, some resources would be skipped
2020-10-06 17:16:49 +01:00
baldurk e17eddad1e Bump version to 1.11 2020-09-18 17:24:00 +01:00
baldurk 56f82f6bf1 Optimise UI for large descriptor arrays with few dynamically used binds
* We tune the pipeline state view and texture viewer to only iterate over a
  small list of dynamically used binds in the (vastly more common) case where
  unused binds are not being shown.
2020-09-03 18:09:47 +01:00
baldurk 4dbfca2390 Add std::hash overload for ResourceId to allow use in hashmaps/hashsets 2020-09-03 18:07:46 +01:00
baldurk d71d275dc4 Don't re-read entire logfile every time, only read from last position 2020-09-03 17:45:41 +01:00
baldurk 83f7a26ee9 Query which shader disassembly formats require a pipeline
* This allows us to be a bit more friendly in the UI when we don't have a
  particular pipeline associated with a shader.
2020-09-01 14:03:59 +01:00
baldurk 680857cb0f Fix structured data conversion to preserve timestamp base
* The timestamp base is queryable from the capture file and settable too, and
  conversions preserve un-rebased timestamps. Only rebasing when loading a
  capture for replay.
2020-08-27 15:54:01 +01:00
baldurk 9fd7f447d2 Switch thumbnail to bytebuf instead of byte pointer and length 2020-08-26 19:27:42 +01:00
baldurk 64f98f286e Add test of heavy descriptor reallocation and reuse 2020-08-20 13:48:17 +01:00
baldurk a48ab556f3 Fix compile errors 2020-08-19 19:18:37 +01:00
baldurk 73cc1f5476 Add specialised rdcarray which implements key/value lookup 2020-08-19 15:21:00 +01:00
baldurk d2e0b7ceb1 Implement move semantics support for rdcarray/pair 2020-08-19 15:21:00 +01:00
baldurk aac929af8f Go back to reporting normalised vertex inputs on GL as SNorm/UNorm
* This is still accurate, what we're missing is "read data as int, then cast to
  float" which is represented by setting 'floatCast' to true. A normalized cast
  or interpret is accurately represented by saying the input is snorm/unorm
  typed.
2020-08-13 10:22:56 +01:00
baldurk d1c9564267 Show float casting and normalising of GL vertex attributes. Closes #2013 2020-08-10 11:19:57 +01:00
baldurk 5af3a4e23b Add a debug option to embed the log file in captures 2020-07-29 10:59:18 +01:00
baldurk 865d39ec44 Bump version to 1.10 2020-07-22 18:48:41 +01:00
baldurk f6babe77fd Handle depth clipping and depth bounds failure separately
* This prevents truly depth-clipped fragments from being wrongly reported as
  other failures like backface culling.
2020-07-20 16:07:36 +01:00
baldurk 08a3d05e71 Explicitly note which modifications in pixel history are unavailable 2020-07-16 20:39:25 +01:00
baldurk 02a54be6ad When replaying resource discards fill with explicit pattern. Closes #284
* This helps catches cases where a discarded image is accidentally used and in
  many cases may still have valid data. Particularly on Vulkan this is relevant
  for DONT_CARE renderpass load and store ops.
2020-07-13 17:29:11 +01:00
baldurk bc4a803605 Add usage entries for discards. Closes #1951 2020-07-12 10:52:10 +01:00
baldurk 0d026a43d6 Remove CompType::Double
* This is a leftover artifact from before we had general extended type support
  and double was the only non-32 bit type we handled. Now we support most type
  formats so doubles are just CompType::Float with 8 byte width
2020-07-12 10:52:10 +01:00
baldurk c10089c94b Invert y display for vulkan with negative viewport height. Closes #1971 2020-07-06 11:20:23 +01:00
baldurk 35854957db Add support for VK_EXT_extended_dynamic_state 2020-07-03 15:43:00 +01:00
baldurk d4ddb565d0 Add a per-shader debuggable flag to allow finer grained status
* E.g. on D3D12 we can debug DXBC shaders but not DXIL shaders. On vulkan this
  will allow us to have the UI work better when encountering shaders with
  unsupported capabilities or extensions.
2020-06-18 17:22:45 +01:00
baldurk 592cf968e3 Add a new analytics tracking flag for "has any capture used DXIL" 2020-06-18 17:22:44 +01:00
baldurk 5d2cfe9897 Handle stringising 64-bit enums 2020-06-01 21:54:43 +01:00