Commit Graph

257 Commits

Author SHA1 Message Date
baldurk d37b0ee00b Fix issue with iterating actions via previous/next in python
* We keep parent references when returning child objects via reference/python
  object wrappers rather than copying. But when iterating a linked list like the
  actions this can produce an incredibly long parent chain and then on
  destruction we can stack overflow if the chain is long enough.
2024-12-03 15:01:58 +00:00
baldurk d5cc1cf626 Import threading on python context startup on main thread for debuggers 2024-07-15 16:22:38 +01:00
baldurk 153cd2aa16 Expose queries for descriptor stores and D3D12 root signature range
* This will allow a UI viewer or consumer of the replay API to more easily query
  'all' descriptors for a given store.
2024-04-10 18:58:53 +01:00
baldurk 0284d551ea Switch from specific Attachment structs to using Descriptor for outputs 2024-04-10 18:58:52 +01:00
baldurk 205ed0e6fa Remove old shader bindpoint mapping handling entirely 2024-04-10 18:58:52 +01:00
baldurk 2a41eb54dd Add new common pipeline state accessors for descriptor-based accesses
* These are temporarily given separate names, to allow them to exist in parallel
  with the existing helpers, but in future these will be renamed when the older
  helpers are removed.
2024-04-10 18:58:51 +01:00
baldurk d88aad8fc2 Add a query to determine logical identifiers for descriptors
* This is a consideration for any cases where binding numbers are relevant -
  primarily D3D11 and GL - where the offset into an arbitrary (and possibly
  fake) descriptor storage is not helpful but knowing the register binding
  definitely is.
* If someone wants to look at the raw descriptor contents without respect to a
  particular shader access they can use this query to determine a more useful
  'name' for any given descriptor. On D3D11 and GL this gives the register
  number, on Vulkan it gives the binding number (and array element). On D3D12 it
  just repeats the offset effectively.
2024-04-10 18:58:50 +01:00
baldurk fa22c7c7fc Report vulkan dynamic offsets separately for manual application
* Baking these into descriptors when we get arbitrary 'GetDescriptor' queries
  independent of the bound descriptor sets is not possible - a descriptor set
  could be in theory bound twice to two places with different dynamic offsets.
* Instead we report these as part of the pipeline states and the abstraction &
  replay API consumer will need to manually apply them to get the true buffer
  offset.
* The offsets are indexed by descriptor storage byte offset for easier
  processing (the dynamic offset struct can be turned into a pair and used to
  initialise a dict)
2024-04-10 16:12:32 +01:00
baldurk 58c3dc52a7 Add reporting of GL texture completeness and conflicts for descriptors 2024-04-10 15:51:10 +01:00
baldurk 227842a295 Add a structure and query for reporting descriptor accesses 2024-04-10 15:33:36 +01:00
baldurk b94e6ff90c Add a stubbed out query for pulling descriptor contents out of a store 2024-04-10 15:01:26 +01:00
baldurk 1fb29ce97d Explicitly build with C++14 everywhere
* This doesn't change our minimum specs as we already required GCC 5, clang 3.4,
  which fully support C++14. Interestingly only VS2015 is the odd one out but we
  don't rely on any features from C++14 that it doesn't support.
2024-04-10 14:38:05 +01:00
kb1000 bb7ec408cb Use pythoncapi-compat to simplify Python C API backwards compatibility 2024-04-08 10:57:28 +01:00
kb1000 d0a24b31cd Fix some deprecated and internal Python C API usages 2024-04-08 10:57:28 +01:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
baldurk faa0695323 Support property-page customisation on python module projects 2024-01-30 20:31:35 +00:00
baldurk 1e70124bd6 Support setting overridden python path via VS properties page 2024-01-30 20:29:07 +00:00
baldurk 32c946dd14 Search for newer python versions at build time 2024-01-30 16:51:03 +00:00
baldurk 69dcb42a05 Add enums and API-agnostic handling for new task and mesh shader stages
* The enums are given after compute, to preserve indices for the normal vertex
  pipeline.
* Mesh dispatches are considered a new action type, rather than being bundled
  into the `Drawcall` type. This will allow them to be distinguished by API
  backends as needed. The UI treats them as drawcalls
* We apply this universally even though it's not relevant to D3D11/GL. It means
  a couple of empty array entries but it should not cause any significant
  issues.
* Shader messages will be identified by group and thread as with compute
  shaders. For mesh shaders there is an additional subdivision to identify them
  by task group, since each task group can submit a grid of mesh groups.
2023-11-16 18:20:23 +00:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
baldurk e7430226e9 Match SPIR-V version as much as possible when rebuilding shaders 2023-08-22 13:41:39 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk eab6a2c73c Fix python comparison operators throwing exceptions
* When used in richcompare this would throw an exception and return
  Py_NotImplemented causing a failure. Instead we should just return NULL, which
  is fine and will be considered as a not-equal comparison for
  equality/inequality and throw the kind of exception we want for less than or
  greater than.
2022-12-13 11:12:45 +00:00
baldurk 2cf7b911c7 Fix refcounting issue with python frame objects 2022-11-09 12:20:48 +00:00
baldurk 9df7d40241 Fix compilation on python version update on mac CI 2022-11-02 12:22:33 +00:00
baldurk 39920c1b71 Show the version running when connecting to incompatible remote server 2022-10-03 20:10:41 +01:00
baldurk e061ea3b2e Improve handling of compilers & command line for edited shaders
* We store the compiler used (when known) in shader debug info and use that to
  select the compiler for editing as even higher priority than the default for a
  given language/encoding combination.
* We also ensure that for known tools we add the input and output parameters
  last, after any custom parameters, so that they are always present regardless
  of what the user puts in.
2022-08-10 14:56:44 +01:00
baldurk 935fa49c98 Store source vars data per-instruction rather than per-state
* Since the source vars data doesn't change for a given instruction, we can pre-
  calculate it and save time on re-calculating per-state.
* Note callstack *can* change per-state on SPIR-V where the same instruction can
  be reached by different flow paths, so the callstack remains part of the per-
  state data.
2022-08-03 17:44:11 +01:00
Jake Turner fb04266122 Disable Clang "-Wshorten-64-to-32" for files
3rdParty source files and some renderdoc files which include 3rdparty header files

Disable "-Wshorten-64-to-32" for the whole of qrenderdoc render_python.cxx triggers the warning
2022-07-21 11:49:49 +01:00
Jake Turner 1622667bf8 Disable Clang "-Wshadow" for specific files
3rdParty source files and some renderdoc files which include 3rdparty header files

Disable "-Wshadow" for the whole of qrenderdoc render_python.cxx triggers the warning
2022-07-21 11:49:49 +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 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
Remi Palandri d1858f4479 add support for VK_QCOM_FDM_offset 2022-02-14 21:02:27 +00:00
baldurk e42b0ff2ca Refactor ShaderVariable use and non-32-bit precision. Closes #2466 2022-02-02 15:00:43 +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 33751470f2 Fix random new CI failure by setting CMAKE_CXX_STANDARD_REQUIRED 2021-11-25 12:16:45 +00: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 dcaabf42e9 Allow python to register custom event filters 2021-07-01 15:15:01 +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 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 4eb2621bca Fetch shader messages from DebugPrintf 2021-05-11 16:15:31 +01:00
baldurk eac94b74f6 Allow cbuffer previewer to apply custom format to non-buffer-backed CBs
* This in particular means push constants and specialization constants on vulkan
  but also applies to root-value cbuffers on D3D12.
* GL bare uniforms are not feasible to expose in this way.
2021-04-14 18:59:12 +01:00
Dean Ellis 88cb0615d0 Add Support for building the Python API against Python 3.9 2021-03-22 18:22:17 +00:00
Jake Turner faa9dbf709 Enable pyrenderdoc for Apple
It was previously marked as disabled for Apple
Required to build the python modules which are used by the testing framework
Python imports .so libraries by default, change the shared library extension to .so for python modules on Apple
2021-03-14 11:17:31 +00:00
Jake Turner 769fade4cf Fixed small typo "htat" -> "that" 2021-03-14 11:17:31 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 3aaccc4fda Use rdcfixedarray in parameters for functions instead of C arrays
* This maps better to tuples in python
2020-12-15 22:52:38 +00:00
baldurk 2b0f9c2eba Use richtext representation for ResourceId when converting to string 2020-12-15 22:52:38 +00:00
baldurk 143f66478a Support converting an rdcarray pointer to rdcarray
* This means if there's no intervening list() it still works, e.g. passing an
  rdcarray property to a function paramater that expects an rdcarray in python.
2020-12-15 22:52:38 +00:00