Commit Graph
17147 Commits
Author SHA1 Message Date
baldurk 282074f9a4 Try to avoid crash after fatal device error 2025-08-04 10:35:12 +01:00
baldurk 29a1590149 Fix description of enum 2025-08-04 10:33:40 +01:00
baldurk dbeeb67459 Display a specific message for resources with no usage tracked
* Currently we only track usage for buffers and textures.
2025-07-31 17:10:14 +01:00
baldurk 9bfcb76e0b Try to de-elevate after applying an update to not run UI as admin 2025-07-31 17:10:14 +01:00
baldurk e6a7b36cdc Add the ability to cancel an update while it's downloading. Closes #3162 2025-07-31 17:10:14 +01:00
Jake Turner 1ac6963d31 D3D12 ShaderFeedback fix GPU hang when analysing ExecuteIndrect
Need to recreate the EI command signature using the same root signature that is is bound i.e. the modified root signature which includes the resources for the shader feedback analysis

This only needs to be done if the EI command signature modifies the root arguments i.e. setting root constants, updating bindings
2025-07-31 10:28:40 +01:00
Jake Turner 558022bc02 D3D12 ExecuteIndirect allow callbacks to change the commandSignature
This allows callbacks to recreate the command signature to match the root signature (which might have been modified) i.e. shader feedback
2025-07-31 10:28:40 +01:00
Jake Turner d4fd3c16f8 D3D12 ExecuteIndirect constants changes are cumulative
Set the specific constant data from the EI args instead of replacing all the constant data with the EI arg data i.e. EI arg sets Constants 2,3 : should leave Constants 0, 1, 4, 5 with the values set directly i.e. SetGraphicsRoot32BitConstants()
2025-07-31 10:28:40 +01:00
Jake Turner a8ee82bfe8 Extend D3D12_EXECUTE_INDIRECT test for partial update of root constants
Change colour of triangle based on root constant values set by direct API not by indirect API.
This allows verification that RenderDoc replay of indirect root constants does not alter values set by the direct API
2025-07-31 08:07:19 +01:00
baldurk c4ab650a63 Fix serialisation of size_t members
* This was caught by mac CI. Technically this is a backwards compatibility
  breaking change but in practice there will be no captures, and certainly none
  on 32-bit
2025-07-31 01:17:18 +01:00
baldurk 29f39f4507 Add VkDescriptorBuffer to documentation index 2025-07-31 01:11:02 +01:00
baldurk 07396210d3 Fix 32-bit compile errors 2025-07-31 00:52:37 +01:00
baldurk db28189dbe Move descriptor lookup code out of core file 2025-07-30 22:10:26 +01:00
baldurk e0d9a8888b Debug opt-out of serialising all buffer descriptors 2025-07-30 22:10:26 +01:00
baldurk d1abd44314 Enable use of VK_EXT_descriptor_buffer. Closes #2880 2025-07-30 22:10:26 +01:00
baldurk 2d16fcca99 When using descriptor buffers ensure descriptor layouts are identical
* During replay we add shader visibility - this could cause the layout and order
  of bindings to change so ensure it happens during capture as well.
2025-07-30 22:10:26 +01:00
baldurk 203a973760 Recognise NULL descriptors in fast lookup
* This prevents us falling back to the full fallback in most NULL descriptor
  cases.
2025-07-30 22:10:26 +01:00
baldurk 316a9bafd7 Handle buffer views not being present when debugging descriptor buffers 2025-07-30 22:10:26 +01:00
baldurk 01a6a488a9 Demo that does descriptor analysis for identification 2025-07-30 22:10:26 +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 52fa006beb When descriptor buffers are used, intercept swapchain images
* This is the only way we can handle the potential for creating descriptors for
  swapchain images as there is no way otherwise to fetch and replay the opaque
  descriptor data on the image that would be needed. We add an extra
  interception step and let the application write to a 'real' image that we
  allocate, prevent it from going into the present layout, and on present do a
  copy & fixup.
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
baldurk 0d784c5728 Only reserve descriptors once even when self-capturing
* We mark to ourselves that the reserved descriptor range has been grabbed and
  don't try to re-create it, instead sharing/re-using it between different
  versions.
2025-07-30 22:10:25 +01:00
baldurk b7001986bc Add support for quad overdraw overlay with descriptor buffers 2025-07-30 22:10:25 +01:00
baldurk 71437e2800 Reduce reported limits to allow us to expand all descriptor buffers 2025-07-30 22:10:25 +01:00
baldurk 799a9a8452 Report and display descriptor buffer state in pipeline view 2025-07-30 22:10:25 +01:00
baldurk 29242c2f31 Remove special case for fetching inline uniform data that's now unneeded
* We previously had to special case this because there was no way to fetch this
  data from the generic replay layer via GetBufferData, but since the descriptor
  factor we special case descriptor sets to be queryable as-if they are buffers
  and so the normal flow works fine for this.
2025-07-30 22:10:25 +01:00
baldurk d92688d962 Look up descriptors from raw descriptor buffer bytes 2025-07-30 22:10:25 +01:00
baldurk ccd99a5a91 Handle descriptor buffers when processing descriptor accesses 2025-07-30 22:10:25 +01:00
baldurk 3d23227dd4 Don't generate resource usage for descriptor buffers
* This will need to be handled separately by post-patching usage in at submit
  time using versioned copies of the descriptor buffer (hopefully only one)
2025-07-30 22:10:25 +01:00
baldurk 30cfee6f2b Add workaround for NV descriptor buffer bug 2025-07-30 22:10:24 +01:00
baldurk 9c259e8ccf Propagate pipeline flags to derived pipelines 2025-07-30 22:10:24 +01:00
baldurk f86c36d4f6 Forced reference images/samplers/views when using descriptor buffers 2025-07-30 22:10:24 +01:00
baldurk 5b5e4f9bbb Insert serialisation of opaque capture data for resources as needed 2025-07-30 22:10:24 +01:00
baldurk 6e1bacf1f2 If descriptor buffers are enabled estimate descriptor formats
* We do this independently for capture/replay, there is no need to serialise the
  results as any bit-differences in descriptors will cause a failure
2025-07-30 22:10:24 +01:00
baldurk f75a39d171 Implement descriptor buffer binding and track & restore its state 2025-07-30 22:10:24 +01:00
baldurk dacb5aab79 Add fast descriptor lookup for known descriptor formats
* The idea here is to directly extract a pointer and/or size and do few lookups
  (hopefully only one) to verify that we have recognised the descriptor. We
  still have the trie lookup as backup.
2025-07-30 22:10:24 +01:00
baldurk 76119c5811 Record information needed during replay for fast descriptor lookups
* For palettised image/sampler descriptors this includes initialising the
  palette with the opaque data, and for regular image descriptors this means
  recording the address range of images. Buffers we already have their addresses
  which is all we need.
2025-07-30 22:10:24 +01:00
baldurk c9dc74c572 Use GPU address range tracker during replay for BDA buffers 2025-07-30 22:10:24 +01:00
baldurk 15e63e9b8e If available enable the ImageLayoutIgnored feature
* This should really have been considered a property, it's unlikely drivers do
  anything different, but we want to be able to count on it being present.
2025-07-30 22:10:24 +01:00
baldurk 04474a885a Record unique texel buffer formats seen during replay 2025-07-30 22:10:24 +01:00
baldurk 03f0fbe6fa Record descriptor byte patterns in trie with DescriptorSetSlot value 2025-07-30 22:10:23 +01:00
baldurk 2eb028f31a Descriptor buffers must force on BDA for all memory
* This is required for any images that will be bound to the memory
2025-07-30 22:10:23 +01:00
baldurk efd60e5751 Serialise unique descriptor fetches on a per-resource basis
* ASs and samplers can only have one descriptor ever - we automatically fetch
  this at creation time when descriptor buffers are enabled. We also fetch all
  possible NULL descriptors at device creation and do not re-serialise them
  afterwards.
* Image views may have either 1 descriptor (if layouts are ignored) or N (one
  per layout). Buffers have N per offset/size and optionally format. These are
  tracked for uniqueness in the corresponding resource record to ensure we don't
  serialise infinite descriptors over time.
* For combined image/samplers since they are in a known format we serialise
  these as-if they are image view descriptors only (with some extra data that we
  ignore). The whole descriptor must still replay bitwise identical but we will
  only use the image view part of it.
2025-07-30 22:10:23 +01:00
baldurk 4ebfded137 Track ASs by address when descriptor buffers are enabled
* They are written into descriptors via address not object with descriptor
  buffer
2025-07-30 22:10:23 +01:00
baldurk ff11a2b0e1 Add CAPTURE_REPLAY_BIT flags globally when descriptor buffers are used
* This applies to all ASs, images, image views, buffers and samplers. Buffer
  views are not used with this extension. We enable this globally even if there
  are resources which wouldn't be possible to put in a descriptor (e.g. transfer
  only) or if they are internal allocations. The ordering rules are poorly
  written - as the letter of the spec goes it would be impossible to ever omit
  this flag during capture since we can't put all capture/replay creates before
  all non-capture/replay creates. On replay in theory we could, but we also
  don't know how well drivers will implement these rules anyway.
2025-07-30 22:10:23 +01:00
baldurk a1ee01e89c Force reported descriptor buffer sizes to be robust sizes 2025-07-30 22:10:23 +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 f896f8a2e2 Enable robust buffer access during capture
* We already enable this during replay, for descriptor buffer we will have to
  have it match but in general it's a good idea to match environments between
  capture and replay.
2025-07-30 22:10:23 +01:00