Commit Graph

16395 Commits

Author SHA1 Message Date
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
Jake Turner cb83fac970 DXIL debugger support for GPU batching of Math and SampleGather ops 2025-10-25 15:12:39 +01:00
Jake Turner 6bb8070fd2 Add a lock around Atomic memory operations in DXIL debugger 2025-10-25 15:00:07 +01:00
Jake Turner 02f08bb051 DXOp::WaveIsFirstLane considers helper lanes as active 2025-10-25 14:46:38 +01:00
Jake Turner 7b146ec97d Convert DXIL Debugger to run simulation multi-threaded
Enabled by default : config option "D3D12_DXIL_Debug_EnableShaderDebugMT"

By default run jobs in a hot spin loop in a single JobQueue job
Each JobQueue Job runs SimulationJobHelper which is a while loop looking for threads to simulate

Developer option "D3D12_Hack_ShaderDebugUsesJobSystemJobs" to run simulation steps in individual job system jobs.
2025-10-25 14:33:12 +01:00
Jake Turner 0e20fbf9fb Added caching to DXIL APIWrapper and Debugger
Added TypedUAV Load/Store to APIWrapper
2025-10-25 14:17:40 +01:00
Jake Turner f72c1a3769 DXIL debugger support for queued GPU operations (run on Device Thread) 2025-10-25 14:04:19 +01:00
Jake Turner 516dec8e17 DXIL debugger support for queue and run simulation on Device Thread 2025-10-25 13:49:28 +01:00
Jake Turner 0243927d43 DXIL Debugger can simulate multiple instructions per step 2025-10-25 13:36:33 +01:00
Jake Turner fe8e63f7ec Reworked DXIL debugger simulation in preparation for multithreading
Rearranged to isolate the simulation of a single lane into a helper function: InternalStepThread(uint32_t lane)
2025-10-25 13:24:43 +01:00
Jake Turner c4fa11b6e6 Assert for DXIL the subgroup is converged for subgroup ops 2025-10-25 13:12:20 +01:00
Jake Turner 34a8af762b Cache DXIL SSA ID Result names
The disassembly will populate the cache and the debugger will reuse the cache
2025-10-25 13:00:24 +01:00
Jake Turner 99b3137b41 Add asserts for DXIL ThreadState APIs to be called on the device thread 2025-10-25 12:47:25 +01:00
Jake Turner 6ce3e5a6ec Add asserts for DXIL Debugger APIs to be called on the device thread 2025-10-25 12:35:46 +01:00
Jake Turner 755c96640f Add asserts for D3D12APIWrapper APIs to be called on the device thread 2025-10-25 12:23:54 +01:00
Jake Turner c74022dfd2 Remove use of APIWrapper from DXIL ThreadState
Make the APIWrapper calls become Debugger APIs which then call the wrapper
2025-10-25 12:08:18 +01:00
Jake Turner 97283a60e2 Change DXIL Shader Debugger steps chunk size to 1,000,000
Helps to reduce the number of replays during shader debugging which helps when captures have non-deterministic replay
2025-10-25 11:53:42 +01:00
Jake Turner d7169cf8b0 Rework DXIL ThreadState in preparation for Multithreading
Make all members private with Set/Get APIs are required.
Mark containers which must be thread safe
2025-10-25 11:53:42 +01:00
Jake Turner 0dba797e30 Rework DXIL D3D12APIWrapper helper in preparation for Multithreading
Make it persistent in the lifetime of the DXIL Debugger session
Add the wrapper to the DXIL Debugger
Make the wrapper replay reset consistent
Store initialisation data in the ApiWrapper
Pull data from ApiWrapper into Debugger during BeginDebug()
Makes DXIL debugger behave more like SPIRV debugger during its initialisation
2025-10-25 11:53:42 +01:00
Jake Turner 1ea88a43f2 Remove D3D_Hack_EnableGroups
Now supported by default for D3D11 & D3D12
2025-10-25 11:53:42 +01:00
Jake Turner a4d407ec3a Enable D3D11, D3D12 groupshared, subgroup, workgroup tests
D3D11_Groupshared, D3D12_Groupshared
D3D12_Subgroup_Zoo
D3D11_Workgroup_Zoo D3D12_Workgroup_Zoo
2025-10-25 11:01:13 +01:00
Jake Turner bc403a291d DXIL debugger handle all int/float types for DXOp::Dot2/3/4 2025-10-25 10:17:24 +01:00
Jake Turner 8a725233d6 DXIL debugger handle all float types for DXOp::Saturate 2025-10-25 10:16:56 +01:00
Jake Turner eebb66eea1 DXIL debugger handle all int types for DXOp::IMin, IMax, UMin, UMax 2025-10-25 10:16:19 +01:00
Jake Turner d3e8891e41 DXIL debugger handle all float types for DXOp::FAbs 2025-10-25 10:15:41 +01:00
Jake Turner 1520431350 DXIL debugger handle all float types for DXOp::FMin, FMax 2025-10-25 10:15:12 +01:00
Jake Turner f1344c5485 Fix DXIL Debugger support for structs in the output structure
i.e. matrices

Fixed incorrect asserts in StoreOutput
Fixed source variable mapping
2025-10-25 08:35:20 +01:00
Jake Turner d1054b8fa2 DXIL Debugger improve handling of arrays of Samplers
Previously would only work in very simple scenarios where the array of Samplers was accessed once
2025-10-24 07:50:42 +01:00
Jake Turner 58ec8fd9d3 Simple test cases of arrays of Samplers for the DXIL debugger 2025-10-24 07:49:44 +01:00
Jake Turner 8a8aaf269a Fix DXIL global samplers resize() which should have been reserve() 2025-10-24 06:51:29 +01:00
Jake Turner 8aa42d0348 Set the correct number of elements in LaneBuffer 2025-10-23 09:48:19 +01:00
Jake Turner c756cbeced Move DXBC debugger comment to the correct place 2025-10-23 09:15:42 +01:00
Jake Turner 1c10c0654a Make DXIL GlobalVar names unique in the debugger and disassmbly 2025-10-23 09:15:42 +01:00
Jake Turner 9c31e0131e Fix validate_trace() being called from generate_full_trace() 2025-10-23 09:15:42 +01:00
baldurk 6fe5e8d765 Use serialised desc struct for serialised RT emit info call 2025-10-22 18:24:04 +01:00
baldurk 7b00e42310 Handle NULL arrays being bound on D3D11 2025-10-21 23:31:22 +01:00
baldurk 2f6bb02347 Fix some sizing issues with CS labels in D3D11 pipeline state view 2025-10-21 23:31:22 +01:00
baldurk 5fd9cd67a5 Ensure D3D12 descriptors are properly initialised for pipeline state 2025-10-21 23:31:22 +01:00
baldurk f42dbdcdd6 Don't force API validation in development builds on D3D11/GL 2025-10-21 23:31:22 +01:00