Commit Graph

132 Commits

Author SHA1 Message Date
baldurk 31d29fcea1 Add python function to clear replay cache 2025-02-21 14:19:12 +00:00
baldurk 1194531fc5 Add a descriptor viewer for showing all of a heap, root sig, or set 2024-04-10 18:58:53 +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 2bbe1a8cd9 Update shader viewer and debugging with new reporting for shader binds
* This shifts from reporting from the old style bindset/bind to the new system
  of only referencing by shader interface and index (independent of binding
  model).
* The vulkan shader debugger re-uses the replay interface to cache descriptor
  access and descriptor contents in a fashion friendly to interface-index
  lookup.
2024-04-10 18:58:51 +01:00
Jake Turner 3cb8998841 Vulkan DebugPixel support for multiview debugging
Output "ViewIndex" into the pixel shader hits array
Select the pixel shader input which matches the viewIndex to the passed in view
Ignore the view parameter if set to ~0U (rd.ReplayController.NoPreference)
Ignore the view parameter if any subpass has empty multiviews
2024-03-13 07:58:48 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
Jake Turner 1ca2f15fe0 UI: By default hide windows created by direct code calls
Fixes a problem if a window creates a different window whilst loading a layout and the layout does not contain the second window i.e.

Loading a layout which contains "Mesh Viewer" will create "Event Browser" window from code. If the layout does not contain "Event Browser" then the "Event Browser" window would get parented to the main window and displayed incorrectly when the main window is shown.
2024-01-11 14:24:59 +00:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00: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 94d1ce3917 Cache text for GPUAddress values properly 2022-08-04 16:56:32 +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 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 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 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 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 cc7115e24c Show better window titles for edited shaders 2021-06-28 13:10:11 +01:00
baldurk b4ec703d97 Expose shader printf messages in the UI 2021-05-11 16:15:31 +01:00
baldurk 2070e74cf1 Restore image auto-update on change feature
* This was apparently never ported over to Qt!
2021-01-18 13:22:36 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +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 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 9779c56333 Ensure edited shaders mark a capture as modified for saving 2020-10-23 13:57:38 +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 b5a6796240 Allow qrenderdoc command line python scripts to call sys.exit()
* Previously we'd catch the sys.exit "exception" and print it then show the
  window.
2020-08-31 13:10:38 +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 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +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 6d40bbb783 Add experimental wayland support. Refs #853
* This is only lightly tested and may break heavily. It is disabled by default
 and must be explicitly enabled.
* In particular this is only known to work for Wayland use at capture time.
 Wayland on replay is still unsupported. Known issues include: EGL pbuffer
 surfaces are not implemented on Wayland, Wayland cannot get window dimensions,
 and there are hangs/failures with GL and vulkan presentation with Wayland.
2019-09-02 15:02:27 +01: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 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
Haiyu Zhen ca54a910f5 Add --replayhost command line option for qrenderdoc
This allows users to specify which remote host to connect to on startup.
2019-02-07 23:46:33 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 67ba5f3ed1 Split extensions interface into separate header, add dialog box helpers 2018-10-24 12:22:54 +01:00
baldurk 8447e43e78 Fix panel menus 2018-10-23 15:15:39 +01:00
baldurk 94dfb9890b Allow registering window, panel and context menu items with callbacks 2018-10-23 14:23:12 +01:00
baldurk dd3a352408 Add registration and loading of extensions through a management window 2018-10-23 14:23:11 +01:00
baldurk 0cd0dce704 Don't overload Replay() return type with concrete ReplayManager 2018-10-23 14:23:10 +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 0dda96a045 Change previous/next/parent IDs in DrawcallDescription to pointers
* This is a legacy holdover from the C# interop not being able to preserve
  pointers easily.
2018-06-18 18:39:06 +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 2d0f675ca8 Add socket-based interop with RGP and profile embedding in captures 2018-04-25 19:10:51 +01:00