Commit Graph
64 Commits
Author SHA1 Message Date
baldurk 83919d9306 Remove GetOriginalIDs and naming/comments mentioning original IDs
* Original IDs are now always equal to live IDs.
2026-01-05 22:51:39 +00:00
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
baldurk 26cf7d3d7f Ensure shader reflection information is stored as const
* Avoids accidental modifications
2025-09-22 11:58:56 +01:00
baldurk 95ef6bc400 Handle mutable descriptor types in descriptor buffers 2025-07-30 22:10:26 +01:00
baldurk 2fe13e8cdf Implement resource usage tracking by versioned readback 2025-07-30 22:10:25 +01:00
baldurk 315d4a8d4f Add handling for descriptor buffers to shader feedback 2025-07-30 22:10:25 +01:00
Jake Turner eede382884 Vulkan Shader Feedback clamp BDA offset to maximum byte offset
This will include any byte offset the feedback slot has

For non-BDA clamp the ssboindex to the maximum array index
2025-07-09 14:35:48 +01:00
baldurk fc9999d67c Add support for varargs length in utf8 printf 2025-05-13 14:11:42 +01:00
baldurk 2322e165de Update copyright years to 2025 2025-03-14 18:54:37 +00:00
baldurk 4ad2deb049 Add a helper for running an action with proper barriers for feedback 2025-02-10 17:52:29 +00:00
baldurk 9bcb68c2de Update bindless feedback code to use new helpers 2025-02-10 17:52:28 +00:00
baldurk ac27c60b05 Don't copy instructionLines map when processing shader printfs 2025-02-05 16:36:55 +00:00
baldurk c4caa7395c Keep GPUBuffer fully unwrapped to avoid problems during capture 2024-12-09 16:19:20 +00:00
baldurk 5fe6b5c8e2 Print file & line for error-checked return codes 2024-09-06 16:42:10 +01:00
baldurk 16c440776d Fix bounds check on number of descriptor sets 2024-07-16 11:00:37 +01:00
baldurk 217d52da2a Update SPIR-V headers and allow OpExtInstWithForwardRefsKHR
* For our purposes we can trivially treat this as equal to OpExtInst since we
  mostly don't care about forward references and don't use the debug information
  where forward references are likely to be generated (class member function
  type information).
2024-06-24 12:10:51 +01:00
23a2107fc2 Add initial shader object state to VulkanCreationInfo
Added function ShaderObject::Init to initialize VulkanCreationInfo::ShaderObject, and associated shader module.

Co-authored-by: James Sumihiro <james.sumihiro@ntd.nintendo.com>
2024-05-13 10:38:54 +01:00
baldurk fbed56ac55 Don't report descriptor access for non-stage-visible descriptors
* If these are actually used it's an application error.
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 5e759b7fc9 Fetch vulkan dynamic feedback directly as descriptor accesses 2024-04-10 18:58:51 +01:00
Jake Turner 226bf7071b Add ShaderBuiltin::MultiViewIndex
Mapped to:
SPIR-V ViewIndex (which was previously mapped to ShaderBuiltin::ViewportIndex)
GL gl_ViewIndex
2024-02-14 11:10:15 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
baldurk 3da12b266e Account for OpLine/OpNoLine when skipping past SPIR-V function variables 2023-12-14 15:10:34 +00:00
baldurk 5ad3e67a2d Implement baseline mesh shader on vulkan
* This supports capture and replay of mesh draws, shader editing with printf
  support, overlays, and pixel shader debugging.
* Not supported yet include the mesh viewer and shader debugging.
2023-11-16 18:20:24 +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
Jake Turner bbd1fe6243 Handle variable sized descriptor sets in FetchShaderFeedback
For variable sized descriptor sets compute feedbackStorageSize using the active descriptor set layout instead of the creation time data.
2023-11-01 14:53:06 +00:00
baldurk 84e61014a1 Add a SPIR-V editor helper to insert a sequence of operations at once 2023-10-30 10:24:30 +00:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
baldurk 811ab29c75 Always offset bindings when doing vulkan shader feedback
* If we don't have BDA support we patch bindings to get our output buffer, but
  we need to be sure to always patch all shaders - if some stages can't be
  patched properly due to lacking store support, we need to still patch the
  bindings.
2023-06-23 17:41:45 +01:00
baldurk f129b5c745 Use access chain for looking up builtins from struct. Refs #2911 2023-04-20 11:12:25 +01:00
baldurk 90ae874c1d Add fallback for shader feedback on Intel GPUs without int64 support
* We don't change very much, we use uvec2 instead of uint64 for passing the
  address in on KHR_BDA, and then do manual carry'd additions for address
  offsets.
2023-04-14 18:28:26 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk c144757d11 Re-use initial replay to fetch shader feedback without polluting state
* Previously with shader feedback being fetched separately we may have had to
  replay multiple times to ensure clean results. If we do it as part of the
  initial replay on selecting the event this issue goes away and we remove the
  extra redundant replay.
2022-11-23 15:19:51 +00:00
baldurk 93bb5acea8 Specify flat decoration for integer inputs we add in patching 2022-11-21 16:08:31 +00:00
baldurk 94c6b36e44 Don't mark draws as having valid empty feedback results 2022-11-08 15:40:16 +00:00
baldurk 30453eb8ce Treat it as valid if no shaders that use dynamic resources are invoked
* E.g. if a draw is off-screen, the PS might not be invoked. If that's the only
  place we expect to see dynamic resources accessed we won't get our valid
  marker but the results should still be considered correct.
2022-11-02 15:29:16 +00:00
baldurk e38b4e0fff Add support for VK_EXT_mutable_descriptor_type 2022-10-14 12:06:09 +01:00
baldurk e169df5d88 Fix backwards masking of SECONDARY_COMMAND_BUFFERS_BIT in dyn rendering 2022-09-05 15:30:56 +01:00
baldurk 7bdf26d329 Implement location tracking and goto for GS printfs
* We can't debug geometry shaders but we can scroll to them, as long as we have
  the primitive. We can't differentiate instances currently without passing that
  data through from the VS (and through tessellation, if it exists).
* This also disables the debug and goto buttons for printfs from shader stages
  that don't support those operations.
2022-07-11 13:02:23 +01:00
baldurk 20c986fc06 Add support for EXT_graphics_pipeline_library 2022-04-13 13:57:48 +01:00
Tatsuyuki IshiandBaldur Karlsson b215fbe306 vk_shader_feedback: Fix crash with dynamic rendering
RenderPass can be null handle when dynamic rendering is used. Retrieve the
respective information from pipeline info instead.
2022-04-08 13:04:21 +01:00
baldurk efbc17335b Make sure to remove secondary subpass flag on renderpasses
* When replaying draws alone in a primary command buffer we need to revert back
  to normal draws in subpasses.
2022-03-15 10:53:26 +00:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
Remi PalandriandBaldur Karlsson c86261e776 add gl_ViewIndex to PS-debugprintf 2022-01-25 19:49:34 +00:00
baldurk 3996d037b9 Add support for Vulkan 1.3 and Roadmap 2022 profile 2022-01-25 13:10:37 +00:00
baldurk bb3343786b Add support for VK_KHR_dynamic_rendering 2021-11-05 14:15:01 +00:00
baldurk bae2f44bf1 Support bool parameters in vulkan debug printf 2021-10-04 19:19:49 +01:00
baldurk c24dd2e7aa Use shader stage to properly disambiguate entry points on vulkan
* It's possible to have two entry points in a SPIR-V module both named "main" as
  long as they have different stages.
2021-10-04 17:03:27 +01:00
baldurk 037f05f3b4 Fetch vulkan shader printf messages from a pristine replayed state
* For draws/dispatches that aren't pure - i.e. modify state that they read from
  - we need to be sure we don't replay the action before running it to fetch
  feedback. For that reason we need to replay up to the action first, then fetch
  feedback.
2021-08-30 17:09:04 +01:00
baldurk cab76389c7 Add fatal (device lost/out of memory) error checking to backends
* We check for errors to try to catch them as soon as possible, and early-out
  return even in the middle of functions. The idea being even if this leaves us
  in a weird state we won't get called again as the replay controller will
  detect the error and substitute out a dummy driver.
2021-08-18 20:12:07 +01:00