Commit Graph
16433 Commits
Author SHA1 Message Date
Jake Turner 2fc51708c9 Fix use of out of scope rdcstr memory for D3D12 shader debugging
Found by ASAN
2025-10-27 16:41:21 +00:00
Jake Turner 6c7126eca1 Fix potentially incorrect indexing in DXIL debugger resource parsing
Found by ASAN build
2025-10-27 16:41:17 +00:00
Jake Turner 8d57a00a64 Fixup D3D12_Resource_Mapping_Zoo Sampler array tests
Add valid samplers instead of sampling using a NULL sampler
2025-10-27 13:57:23 +00:00
baldurk 6425d71fae Replay external memory declarations on images for compatibility
* Descriptors in descriptor buffer may be affected by this, so we need to replay
  it. We add checks that the handle types are still OK to use on replay.
2025-10-27 11:50:36 +00:00
baldurk c983b96e3d Ensure dead resource lifetimes are extended until capture is fully done 2025-10-27 11:50:36 +00:00
baldurk 2ea010f3e2 Don't version descriptor buffers inside a render pass
* Defer it until after like we do with indirect draw readbacks
2025-10-27 11:50:36 +00:00
baldurk c756088d11 Don't version descriptor buffers if there are none bound 2025-10-27 11:50:36 +00:00
baldurk 48088ac07e Add handling of D3D shaders which declare no output value 2025-10-27 11:50:36 +00:00
baldurk 1a5177453c Move GL test to use common pixel history test framework 2025-10-27 11:50:36 +00:00
baldurk fbab189b06 Move D3D11 test to use common pixel history test framework 2025-10-27 11:50:35 +00:00
baldurk a6ad1313fd Move D3D12 test to use common pixel history test framework 2025-10-27 11:50:35 +00:00
baldurk d8fa6a1747 Revamp vulkan pixel history test to cover more cases
* The test is also written generically to be applied to other APIs uniformly
2025-10-27 11:50:35 +00:00
baldurk 2bdcc3dd2f Ensure pixel history is consistent about unknown depth or colour data 2025-10-27 11:50:35 +00:00
baldurk 9c001c3f59 Fix D3D12 pixel history not properly picking up discarded fragments 2025-10-27 11:50:35 +00:00
baldurk f459440d03 Fix issues with mismatching float/uint bindings in D3D11 pixel history 2025-10-27 11:50:35 +00:00
baldurk eb3136808d Fix handling of 3D attachments in pixel history 2025-10-27 11:50:35 +00:00
baldurk f12b2573ad Fix calculation of subresource for mip/slice D3D11 pixel history 2025-10-27 11:50:18 +00:00
baldurk bc1caaffee Ensure all UAVs are unbound for D3D11 pixel history pixel copy
* This is necessary so the source texture can be bound as an SRV - we already
  unbind all RTVs.
2025-10-27 11:50:18 +00:00
baldurk 30a2b704e2 Correctly handle some fragments discarding when doing stencil counting
* If some fragments discard then our stencil counting goes off-by-one. Use
  primitive IDs to render primitives in isolation and determine which ones
  discarded so we can adjust stencil counting as needed.
2025-10-27 11:50:18 +00:00
baldurk 74ecbd235a Explicitly fetch pre/postmod values per-fragment with stencil counting
* This is more precise than propagating pre/post mod
2025-10-27 11:50:18 +00:00
baldurk 4d96b492ec Determine which events had some fragments discard in GL pixel history 2025-10-27 11:50:18 +00:00
baldurk c17557eb5f Always use full precision format for shader output in GL pixel history 2025-10-27 11:50:18 +00:00
baldurk e17a10e329 Fetch clean values for per-pixel pre/post mod in GL pixel history
* We can't assume that premod == postmod in all cases. For colour history on a
  colour target it will be, but depth values can change indepednently. Instead
  we explicitly fetch pre/post mod before and after each event instead of just
  postmod.
2025-10-27 11:50:18 +00:00
baldurk dceced1496 Add a clean FBO to copy from for target image
* The target image won't always be bound to the (or any) current framebuffer, if
  e.g. it's written via image storage. Ensuring we still have a framebuffer to
  copy from keeps most code the same.
2025-10-27 11:50:18 +00:00
baldurk 15fb73a83d Disable depth bounds test as needed when we want depth testing off 2025-10-27 11:50:18 +00:00
baldurk 802a8aa845 Note whether GL pixel history target is depth or colour 2025-10-27 11:50:17 +00:00
baldurk 0be1edd78b Add separate pre/post mod reading in GL pixel history
* We will want to be able to batch these independently and this approach is
  easier with fixed slots than having a slot per type in the same framebuffer.
2025-10-27 11:50:17 +00:00
baldurk 426f9724c0 Mark unbound pixel shader in GL pixel history 2025-10-27 11:50:17 +00:00
baldurk a4ad0f0d2b Ensure GL pixel history finds all possible modifying events
* All tests must be disabled as much as possible, including depth clipping and
  depth bounds, as well as binding a fixed shader for potential shader discards.
2025-10-27 11:50:17 +00:00
baldurk 724bce2d20 Don't ignore based on bound framebuffer for clear or direct writes 2025-10-27 11:50:17 +00:00
baldurk d768527918 Check for discarding at a per-pixel level for test failures on GL 2025-10-27 11:50:17 +00:00
baldurk d2a524ee5b Check for depth clipping and depth bounds failures on GL pixel history 2025-10-27 11:50:17 +00:00
baldurk 1c970a7868 Add global helper for naming D3D12 objects with normal strings 2025-10-27 11:50:17 +00:00
baldurk 384b952625 Use uint/sint type for per-fragment postmod and shaderOut
* We also use a UAV clear for integer targets as needed
2025-10-27 11:50:17 +00:00
baldurk 0cbaefe557 Match target subresource in use for D3D12 pixel history work 2025-10-27 11:50:17 +00:00
baldurk 6f98e46da2 Add helper for quantised-checking of depth test failures on fragments 2025-10-27 11:50:16 +00:00
baldurk 50976369db Depth clears are considered to have depth in D3D12 pixel history 2025-10-27 11:50:16 +00:00
baldurk cc05571135 For vulkan pixel history on MSAA images, always rebind compute state
* The copying of a pixel happens via compute for MSAA targets so the compute
  state becomes dirty in CopyPixelForPixelHistory - we rebind all state to
  ensure it is properly re-set. This is not needed if non-MSAA.
2025-10-27 11:50:16 +00:00
baldurk 7ef6d5d3e0 If there's no depth attachment, disable depth testing during history
* When we add a depth attachment we want to ensure this doesn't "activate" a
  dormant depth test/bounds state which was inactive before due to the lack of
  an attachment, so turn them off explicitly in our replacement pipelines.
2025-10-27 11:48:07 +00:00
baldurk cf42a3ea5c The depth bounds test doesn't run if there is no depth target bound 2025-10-27 11:45:36 +00:00
baldurk f626625490 Query correct attachment for mip/slice in GL clears 2025-10-27 11:45:35 +00:00
baldurk 1521278fd5 Only avoid duplicate failures when exceptions are raised 2025-10-27 11:45:35 +00:00
baldurk 929548f478 Add dummy reads to pipes for linux for some reason 2025-10-27 11:45:35 +00:00
baldurk 969c299448 Silence silly validation warning 2025-10-27 11:45:35 +00:00
Jake Turner fccf3c0408 DXIL Shader Debugger fixes for GPU batching of SampleGather operations 2025-10-27 10:11:17 +00:00
Jake Turner 80307c944c Fetch workgroup inputs for DXIL shader debugger
Used when debugging a subgroup with workgroup operations get the entire workgroup.
Get the subgroup (and workgroup) layout of threads from the GPU instead of assuming tightly wrapped.
Ensure the lane input data is organised to match the simulation expectations
2025-10-25 16:09:19 +01:00
Jake Turner a704828303 DXIL Debugger Load operations copy from backing memory
Don't use the cached value, fixes problems with GSM on a POD type (not array)
Atomic operations always load GSM from global backing memory
2025-10-25 15:57:00 +01:00
Jake Turner f9788d1289 DXIL Debugger ignore duplicate change if baseMemoryId == ptrId 2025-10-25 15:26:03 +01:00
Jake Turner 17e97ca1b0 DXIL Debugger support for runtime Bitcast on a pointer source 2025-10-25 15:25:27 +01:00
Jake Turner 5b47b73f4d Change DXIL UAV out of bounds or null write to be a warning not error 2025-10-25 15:25:13 +01:00