Commit Graph
15588 Commits
Author SHA1 Message Date
baldurk af4bd659e0 Add fetch of subgroup data via GPU readback, handling helpers in PS 2025-02-10 17:52:30 +00:00
baldurk 8d3f40b0a9 Prepare SPIR-V debugger for larger workgroup sizes
* The workgroup size is passed in at creation time, and we handle the potenttial
  for multiple quads by identifying quads via quad ID
2025-02-10 17:52:30 +00:00
baldurk 1cfb684d16 Fetch subgroup configuration (which extensions) and max subgroup size 2025-02-10 17:52:30 +00:00
baldurk 7fcf64a562 Add query for per-thread properties when shader debugging
* This is distinct from input values or builtins because they're entirely
  internal for configuring the workgroup
2025-02-10 17:52:29 +00:00
baldurk 983cf91ef0 Track enabled status of some subgroup vulkan extensions we care about 2025-02-10 17:52:29 +00:00
baldurk b191a02cd1 Add helper tracking in SPIR-V editor to track U32 constants
* It's nice to avoid redeclaring the same constant over and over
2025-02-10 17:52:29 +00:00
baldurk c5b0cd2423 Add development-only checks of SPIR-V edits for valid IDs 2025-02-10 17:52:29 +00:00
baldurk f3ed63c7bf Refactor PS Input fetcher patch to be less pixel-specific
* We also (for now) preserve the existing entry point to keep codegen as similar
  as possible.
2025-02-10 17:52:29 +00:00
baldurk 046b5a0fd1 Add a pipeline cache to speed up repeated recreation of patched shaders 2025-02-10 17:52:29 +00:00
baldurk aae58c765a Add a helper for changing/wrapping an entry point in another function 2025-02-10 17:52:29 +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 7369b8ad6c Refactor vulkan shader debugging to not apply derivatives
* We still use derivatives to fetch the input values for the quad when
  debugging, but we do it on the shader side and read back the raw inputs rather
  than input+derivatives
2025-02-10 17:52:29 +00:00
baldurk 0af29aa6a2 Remove old helper function 2025-02-10 17:52:29 +00:00
baldurk 3fdbcbe638 Update VSOut fetch to use new patched-descriptor helpers 2025-02-10 17:52:28 +00:00
baldurk 26ef7efaa5 Update shader debugging to use new patched-descriptor helpers 2025-02-10 17:52:28 +00:00
baldurk 9bcb68c2de Update bindless feedback code to use new helpers 2025-02-10 17:52:28 +00:00
baldurk 2d067b0e70 Update pixel history dummy write workaround to use new helpers 2025-02-10 17:52:28 +00:00
baldurk 770ee04172 Add common shortcut to write a GPUBuffer to a storage descriptor 2025-02-10 17:52:28 +00:00
baldurk 18ee579490 Centralise helpers for common shader patching tasks
* These are the API-side helpers. One makes it easy to declare and add a
  new buffer for output, handling BDA (KHR and EXT) and plain bindings
  if needed.
* Another is a helper for "grab current state, substitute in a
  shader's SPIR-V, ready to do a single draw/dispatch"
2025-02-10 17:52:28 +00:00
baldurk f557c47c09 Store bindpoint inside VulkanStatePipeline 2025-02-10 17:52:28 +00:00
baldurk 07396bb1b8 Add helper for fetching GPUBuffer address 2025-02-10 17:52:28 +00:00
baldurk 025f1c6b01 Add new helper function for adding reserved descriptors to app desc set
* This is a temporary duplication of PatchReservedDescriptors to make a
  refactoring easier with smaller commits, and is mostly identical but returns
  its data in a struct instead of as loose outputs.
2025-02-10 17:52:28 +00:00
baldurk 70295c39a8 Add quick helper to resize-up feedback buffer 2025-02-10 17:52:28 +00:00
baldurk f7c3bb61fe Calculate desired patched-buffer storage mode once 2025-02-10 17:52:28 +00:00
baldurk 44bda13dbe Add some higher level SPIR-V editing helpers
* These both automate some common (and verbose) tasks and also add extra helpers
  for declaring a new output buffer that might come via BDA or via a binding.
2025-02-10 17:52:28 +00:00
baldurk 6868b67747 Calculate which scopes are available to a given thread when debuggng
* This is conservative as it's not calculated per-entry point, but over-
  simulating threads is not expected to be a huge issue.
2025-02-10 17:52:27 +00:00
baldurk f287da5bdf Fix assert on sparse page tables 2025-02-10 17:52:27 +00:00
Jake Turner 0a302c6707 Remove DXIL Debugger TODO's that have been done 2025-02-10 14:24:00 +00:00
baldurk 3c1fcf4616 Try to be more robust in the face of repeated VK_ERROR_OUT_OF_DATE 2025-02-07 11:28:25 +00:00
baldurk 2c5fee7c07 Set mesh viewer tables to always have a scrollbars
* This can prevent a very rare resize loop
2025-02-07 11:28:25 +00:00
baldurk b691f2421e Update vkconfig check 2025-02-06 17:55:07 +00:00
Martyn JacquesandBaldur Karlsson d44b326130 Dynamically allocate Vulkan output window swapchain arrays
Vivo X90 devices provide 11 swapchain images. Dynamically
allocate output window arrays to handle this.
2025-02-06 13:51:00 +00:00
baldurk faa13cb568 Only use one colour output for discard PS on vulkan
* Fixes a minor validation warning (which may or may not be legit, but is easy
  to silence)
2025-02-05 16:36:55 +00:00
baldurk fb5a6a6133 Fix regression that all D3D11 output targets were considered used
* This would lead to them showing up as 'red' if they are unbound.
2025-02-05 16:36:55 +00:00
baldurk ac27c60b05 Don't copy instructionLines map when processing shader printfs 2025-02-05 16:36:55 +00:00
baldurk b0e8d8e988 Fix writing of identifying SV values during D3D pixel shader debugging
* These inputs are not necessarily in element 0, though they tend to be. They
  can be packed into v2.y though so we should respect that element
2025-02-05 16:36:55 +00:00
Remi PalandriandBaldur Karlsson b1d581b3c2 prevent subsequent calls to setobjectname increasing chunk count 2025-02-05 16:36:33 +00:00
Stefano BonicattiandBaldur Karlsson a0e52feba1 Fix stack-use-after-scope reading QT_QPA_PLATFORM env var
Setting QT_QPA_PLATFORM with putenv from a local variable
causes the environment to later still refer to it when it's out of scope.
Use setenv instead, as it copies the values provided.
2025-02-05 15:40:15 +00:00
Tristan RitchieandBaldur Karlsson 9c8bb99494 Fix alignment calculation when copying GLES compressed tex data
Change-Id: I05140cd6493a2cda9a17864071e7c67a191c9907
2025-01-31 18:07:32 +00:00
Faith EkstrandandBaldur Karlsson 876212c4da Add special cases for Fossilize encoding of mutable descriptors
When mutable descriptor sets are used, Fossizlie needs the
VkMutableDescriptorSetCreateInfoEXT. However, instead of taking it raw
like some other inputs, it uses a simplified version that is just a list
of lists. If we give it full structs, Fossilize will crash. In order to
do this, we need a couple special cases.
2025-01-28 23:31:30 +00:00
baldurk da6a31d619 Fix validation issues around KHR performance query
* Set sType for query-return structures.
* Ignore pass boundaries to not mix queries inside and outside of renderpass
  boundaries.
* Wait for idle before fetching KHR results (don't think it should be necessary
  with VK_QUERY_RESULT_WAIT_BIT but validation expects it).
2025-01-27 12:42:39 +00:00
baldurk 06df4418fd Only submit performance queries for main queue. Closes #3505 2025-01-27 12:41:49 +00:00
baldurk 6865755297 Don't compile multiview vulkan shaders if multiview is not enabled 2025-01-25 15:59:31 +00:00
baldurk e38e2d4177 Fix VK_Descriptor_Index test declaring too large array
* This was variably sized so in practice we didn't use it, but the spec still
  requires us to respect the max sizes that could be used for the upper bound
  and this lead to the wrong texture being sampled on NV.
2025-01-25 15:59:31 +00:00
baldurk 590f51151b Mark mesh shaders using task payloads as unsupported
* The mesh debugger implementation does not fetch the payload.
2025-01-24 16:38:36 +00:00
baldurk b8def8854e Fix typo accidentally introduced 2025-01-21 10:27:20 +00:00
baldurk fa2085860d Always prioritise loading a new d3dcompiler over re-using an old one
* Previously when replaying we'd always use our d3dcompiler_47.dll that we ship,
  but during capture we would always prioritise re-using an existing d3dcompiler
  that the process already had.
* Since it should be safe to have multiple (differently named) d3dcompiler's in
  the same process and we want to avoid using an old out of date d3dcompiler if
  possible, we prioritise loading a new d3dcompiler_47.dll over re-using an
  existing in-process d3dcompiler_43.dll
2025-01-17 15:43:51 +00:00
baldurk a3a5f07a7e Workaround compile error on old fxc's using .sample on 2DMS texture 2025-01-17 15:41:54 +00:00
baldurk 341ed79ed1 Print the reason for unoptimising shaders 2025-01-17 15:26:49 +00:00
baldurk 7cf63c71bc Add more robust error-checking for debug resources 2025-01-17 15:24:01 +00:00