Commit Graph

322 Commits

Author SHA1 Message Date
baldurk 856c838def Update copyright years to 2026 and fix copyright ranges
* In a previous update in 2021 many copyright ranges were truncated
  accidentally, and some files have been copy-pasted with wrong years. These
  dates have been fixed based on git history and original copyright messages.
2026-01-05 14:17:28 +00:00
Jake Turner c2015de391 Resource Usage UI changes
Add a column that shows the parent marker for the event range (by default the end event ID)
Add an option to prevent combining resource usage across markers (group by marker)
The tooltip for a resource usage entry contains the full marker path
2025-12-03 11:20:23 +13:00
baldurk 9e0d6f18d6 Display a message when we can't debug a pixel shader and show a history 2025-10-08 22:34:53 +01:00
baldurk baecdd85ca Improve arrow key nudging behaviour on NPOT mips in texture viewer 2025-09-19 14:13:01 +01:00
baldurk fd86ca4ddc Allow editing zoom level text when fit-to-window is enabled
* We need to disable it before changing the zoom level.
2025-09-19 11:01:12 +01:00
baldurk ceb062b658 Add a DescriptorType to GetDescriptors query
* This will be optional in many cases but for some situations might be required
  when type information is not implicitly available in the descriptor store.
  Generally it should always be available unless the descriptor store is being
  viewed 'blank' purely from its contents with no other context.
2025-07-30 22:10:23 +01:00
baldurk 2322e165de Update copyright years to 2025 2025-03-14 18:54:37 +00:00
baldurk 1ca4b70bf9 Display quad overdraw as disabled when MSAA is enabled on vulkan
* No API supports the quad overdraw with MSAA, but on other APIs it's feasible
  to downgrade and render the overlay at single sampled. On Vulkan with
  renderpasses this is not possible.
2024-09-09 14:45:30 +01:00
baldurk cb46ec9c51 Set correct stage for fake copy descriptors in texture viewer 2024-07-13 22:30:08 +01:00
baldurk 205ed0e6fa Remove old shader bindpoint mapping handling entirely 2024-04-10 18:58:52 +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
baldurk f718e72ac9 Update texture viewer to use new pipeline helpers 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
Jake Turner 7934d1d16e Change DebugPixel() to take a DebugShaderInputs struct
DebugShaderInputs struct contains existing the parameters:

sample
primitive

and a new parameter

view

Default constructor for DebugShaderInputs sets the parameters to NoPreference (~0U).
2024-03-13 07:58:48 +00:00
baldurk 3e2340fe16 Add identified support for slang (the language and the tool) 2024-03-01 12:11:37 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
baldurk 9fe2ec5c2d Fix calculation of slices on 3D textures when viewing up/down mips 2023-12-04 19:11:27 +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 3ba61e20a6 Fix handling of proxying S8 textures 2023-03-16 16:55:21 +00:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk 9eaabe516a Fix calculation of mip co-ordinates. Closes #2836
* Also adds a unit test to verify these helpers
2023-01-27 14:13:21 +00:00
baldurk b8b9fff7f0 Fix order, update texture before fetching histogram. Closes #2828
* This is only relevant when using a custom shader since otherwise nothing is
  'updated', though could also affect overlays potentially. If we don't then the
  custom shader texture may not have been re-rendered before we fetch the
  histogram data and we'll get stale information.
2023-01-25 10:38:16 +00:00
Leonard Tsai f578e62684 Allow multiple depth targets to be viewable in the TextureViewer 2023-01-18 12:56:47 +00:00
baldurk bc2faaf3e6 Track preview when calling UI callbacks to avoid use-after-free 2023-01-05 16:39:51 +00:00
baldurk 0acb955e19 Create virtual distinction between Vulkan & GL SPIR-V. Closes #2798
* This distinction unfortunately does not exist in SPIR-V so we have to carry
  around this metadata ourselves. Rather than allowing free specification of
  tools based on API, instead pretend that Vulkan and GL SPIR-V are separate
  format, and duplicate all SPIR-V tools to handle "both" types. This allows
  appropriate tool selection based on the encoding.
2022-12-27 13:39:44 +00:00
baldurk b5545d52f8 Fix float precision/rounding issues for NPOT textures. Closes #2807 2022-12-27 12:23:05 +00:00
baldurk f0644a2257 Fix issue where multiple thumbnails would be added for overlapping binds
* Previously we iterated over each bind, and found the matching resources. Now
  we iterate over resources and find the matching bind. This matters when there
  are multiple overlapping binds so they are only found once (we don't
  disambguate which bind was used, as we don't elsewhere currently)
2022-11-09 14:15:15 +00:00
baldurk d11da2f3a1 Refactor texture viewer thumbnails to not use swapchains
* There seems to be a significant slowdown when using real swapchains, both for
  creation and display. Since thumbnails don't update often (only on event
  change, or if the panel is resized which is not a regular occurence)
  counterintuitively it's better to render and readback the image offscreen and
  re-upload it on the CPU.
2022-11-09 14:14:24 +00:00
baldurk 336e90d412 Display special D3D quality levels in texture viewer 2022-09-12 13:54:07 +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 234262649f Fix calculation of small mip co-ordinates for NPOT textures 2022-07-15 18:07:08 +01:00
baldurk 8838a878e8 Show the current event in texture viewer usage context menu 2022-06-22 20:04:42 +01:00
baldurk 1eee00f01d Remove unnecessary sRGB conversions 2022-06-16 16:30:00 +01:00
baldurk f01dfbecc1 Add a python extension function to access picked location. Refs #2065 2022-05-31 11:26:59 +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 1ae2afc05a Apply shader prefix even if encoding is directly accepted. Closes #2561
* The prefix, if available, must always be applied for custom shaders to compile
  correctly.
2022-04-22 12:55:40 +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 54fa3a7802 Recalculate scrollbar limits after switching textures. Closes #2470 2022-01-28 13:49:48 +00:00
baldurk bfbc9a3e48 Fix order of scrollbar update when texture scale changes. Closes #2377
* We need to update the scrollbar bounds first based on the current zoom level,
  then change the scroll position. Otherwise the scroll will be visually correct
  but the scrollbars won't match.
2021-10-04 12:10:56 +01:00
baldurk a21d245114 Remove show unused/show empty options from texture viewer 2021-08-26 09:51:37 +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 d8d6557feb Add support for file includes from custom shaders. Closes #2275 2021-05-17 13:47:58 +01:00
baldurk 331db5b4ba Fix custom shader edits to write the exact editor contents to disk 2021-05-17 13:47:58 +01:00
lizj 5fde0ad90d Fix incorrect backcolorPick button state after cancellation 2021-05-10 14:18:19 +01:00
baldurk e3eb2ee754 Fix sorting for texture viewer texture list 2021-04-20 13:51:41 +01:00
baldurk 95e6a4a971 Respect font scale for fixed-width fonts 2021-04-12 13:04:02 +01:00
baldurk 6a6b7f68e1 Display thumbnails for empty resources 2021-04-12 13:04:02 +01:00