Aliya Pazylbekova
56ee544a28
Special treatment of UNDEFINED layout for external images
...
- Preserve the initial contents of UNDEFINED images if they are
external
- Don't consider a pipeline barrier from UNDEFINED a resource
discard for external images
Change-Id: Ife30e7c542a66668d681d492363a25745238119e
2025-10-08 21:11:12 +09:00
Jake Turner
15b510f131
Fix incorrect assert about DXIL result SSA tracking
...
Assert was changed in 0809a6dd3f when ssaMaxExecPoints was made into an rdcarray
2025-10-07 16:43:12 +01:00
Jake Turner
30b45f0cff
Use ShaderDebugData enum when creating Vk Shader Debug Readback Buffer
...
ShaderDebugData::MAX_QUEUED_OPS instead of hard coded 128
2025-10-06 16:20:55 +01:00
baldurk
2485eefc80
viewportCount can't be assumed to be the number of scissors
...
* Although normally viewportCount == scissorCount, if viewport is
DYNAMIC_WITH_COUNT and scissor is only dynamic (or fixed) the number of
scissors must be used strictly.
2025-10-06 14:21:10 +01:00
baldurk
a4ae1e881a
Handle descriptor state being invalid/inaccessible for non-draw actions
2025-10-06 13:17:29 +01:00
Jake Turner
48fd758960
Set the correct values for the return of Operation::CompareExchange
...
Returns a struct: { Original Value, 1 (equal) / 0 (not equal)
2025-10-05 07:50:05 +01:00
Jake Turner
823ae93845
Support for Operation::ExtractVal on a struct
2025-10-05 06:49:54 +01:00
Jake Turner
c1ba2694f7
Remove m_State from Spirv Debugger
...
Replaced with bool hasDebugState
2025-10-04 12:23:10 +01:00
Jake Turner
95b98c81f1
Update Spirv DebugBreak to work with multi-threading
...
Use pendingDebugState instead of m_State
2025-10-04 11:20:11 +01:00
Jake Turner
0809a6dd3f
Changed ExecutionPointPerId to be an rdcarray instead of std::map
...
DXIL Debugger optimisation
2025-10-04 11:09:13 +01:00
Jake Turner
b70b79e897
Changed m_Variables to be an rdcarray instead of std::map
...
DXIL Debuggeer optimisation and thread-safety
2025-10-04 09:25:04 +01:00
Jake Turner
377280eada
Op::ImageRead does not have to be in lockstep
...
It does not require derivatives
2025-10-04 08:19:42 +01:00
Jake Turner
ecd1860789
DXIL Debugger helper lanes don't modify UAVs
2025-10-04 07:16:49 +01:00
Jake Turner
a0db9d5a1f
Comment about thread safety requirements in Spirv debugger ids container
2025-10-03 15:20:57 +01:00
Jake Turner
d7f7be63a9
Spirv debugger small tidy up for consistency
...
Rename:
simulationFinished -> atomic_simulationFinished
Vulkan_Hack_ShaderDebugUsesJobSystemQueue -> Vulkan_Hack_ShaderDebugUsesJobSystemJobs
2025-10-03 06:24:49 +01:00
baldurk
36f8d654dc
Add NULL aliasing barrier around buffer discard patterns
2025-10-02 14:17:20 +01:00
baldurk
2018b5d790
Use the correct state for creating whole memory buffers on D3D12
2025-09-30 11:26:01 +01:00
Zackery Mason-Blaug
30f5a4023d
Add support for VK_EXT_vertex_attribute_robustness
2025-09-30 19:10:06 +09:00
Zackery Mason-Blaug
9711e0eb57
Add support for maintenance9 vertex attribute robustness
2025-09-30 19:10:06 +09:00
Jake Turner
c03b2e2fb0
Remove unused methods from GpuMathOperation & GpuSampleGatherOperation
...
Clear() methods are not used
2025-09-29 17:09:04 +01:00
baldurk
dadf4a14d5
Serialise D3D12 buffer initial contents less memory-intensivesly
2025-09-29 16:37:45 +01:00
Jake Turner
1ccdf7f4f4
Op::ControlBarrier requires full lockstep when being simulated
...
Lockstep before executing the instruction
Lockstep after executing the instruction
2025-09-28 07:26:30 +01:00
Jake Turner
11a4104bde
DXIL Debugger support for thread local global memory
2025-09-28 07:26:30 +01:00
Jake Turner
a5c3ee4b70
Tweak to DXIL debugger cbuffer handling
...
Initialise the ShaderVariable for the handle to 0xCC
Only memory copy the bytes available (do not assume the source buffer is a multiple of 16 bytes in size)
Fixes non-determinism problem (exposed by root constant buffer of size four bytes)
2025-09-25 17:35:35 +01:00
Jake Turner
8ecc23e78d
Return 0,0,0,0 when sampling NULL resources in Spirv Shader Debugger
2025-09-25 17:35:35 +01:00
baldurk
4df53b41d3
Delete parents after base objects
...
* This fixes a potential crash deleting an image view after an image, by
ensuring a non-owning pointer to the image's resinfo remains valid until after
the image view is destroyed.
2025-09-25 16:17:46 +01:00
Jake Turner
8203032ec3
Fix out of bounds writes during spirv debugging
...
Previously it would allow writes to width/height/depth
2025-09-24 15:46:06 +01:00
Jake Turner
da03329b12
Improve handling of NULL resources in Spirv Shader Debugger
2025-09-24 15:35:01 +01:00
Jake Turner
8898fa2e3e
Use liveID to find the descriptor buffer resource in shader debug
2025-09-24 15:34:51 +01:00
Jake Turner
668fa75660
Change some asserts to be development only in Spirv Debugger
...
Asserts used during development of multi-threading and related to the consistency of expected state
2025-09-24 15:31:49 +01:00
Jake Turner
56415992ac
Added CHECK_DEBUGGER_THREAD() to Spirv_Debug.cpp
...
Does nothing in RELEASE, replaces calls to
RDCASSERT(debugger.IsDeviceThread());
2025-09-24 15:29:01 +01:00
Jake Turner
5222954723
Add a lock when simulating Atomic Memory instructions
2025-09-24 15:21:41 +01:00
Jake Turner
234a78ecf2
Remove Vulkan_Hack_EnableGroupCaps
2025-09-24 15:18:14 +01:00
Jake Turner
b536bbaf95
Spirv Debugger 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
2025-09-24 15:14:55 +01:00
Jake Turner
e9e081a55f
Spirv Debugger run multiple simulation steps per job
2025-09-24 15:08:43 +01:00
Jake Turner
d78edcbbea
Added Debugger::GetBufferLength()
2025-09-24 15:02:32 +01:00
Jake Turner
b9945d563e
Active thread runs scope changes on the device thread
...
Run EnterFunction(), EnterEntryPoint(), ProcessScopeChange() on device thread
2025-09-24 14:59:28 +01:00
Jake Turner
7bdf8a8d88
Make pointer read/write methods return DeviceOpResult
...
ThreadState
DeviceOpResult ReadPointerValue(Id pointer, ShaderVariable &ret);
Debugger
DeviceOpResult ReadFromPointer(const ShaderVariable &ptr, ShaderVariable &ret) const;
DeviceOpResult GetPointerValue(const ShaderVariable &v, ShaderVariable &ret) const;
2025-09-24 14:52:42 +01:00
Jake Turner
781984703b
Change WritePointerValue, WriteThroughPointer to return DeviceOpResult
...
Mark any pointer writes that require a callback to run on the device thread
2025-09-24 14:50:46 +01:00
Jake Turner
d93be6f2b2
Multi-threaded support for SPIRV wrapper APIs ReadTexel, WriteTexel
2025-09-24 14:45:14 +01:00
Jake Turner
8d9bb3f168
Add Spirv Debugger APIs to wrap API Wrapper APIs
...
The Debugger APIs run on the device thread if required,
FillInputValue(), ReadTexel(), WriteTexel()
2025-09-24 14:38:33 +01:00
Jake Turner
35fdf44c20
Spirv debugger support for queue and run of Simulation on Device Thread
2025-09-24 14:33:01 +01:00
Jake Turner
6e28ff1ca8
Convert Spirv Debugger to run Thread steps via the JobSystem
...
Enabled by default : config option "Vulkan_Debug_EnableShaderDebugMT"
2025-09-24 14:29:59 +01:00
Jake Turner
94d7f4365d
Batch Spirv debugger MathOp and SampleGatherOp GPU operations
...
Thread Simulation queues MathOp, SampleGatherOp requests and then the Thread is paused.
The Debugger loop processes the MathOp queue, batches MathOps together into a single command list, Submit, Sync.
The Debugger loop processes the SampleGatherOp queue, batches GPU SampleGatherOps together into a single command list, Submit, Sync. Some SampleGatherOps are run on the CPU and do not use the GPU.
When the queued operations are completed, the results are written back into the Thread Simulation and the paused Threads are rerun.
2025-09-24 14:22:04 +01:00
Jake Turner
b9d86315ff
Change Spirv 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-09-24 14:18:43 +01:00
Jake Turner
e6f75e1530
Update Spirv debugger methods to be const methods
...
Add read/write locking for containers "usedNames" and "dynamicNames"
2025-09-24 14:09:43 +01:00
Jake Turner
d0d385ceef
Use const reference for ShaderBindIndex argument passing
2025-09-24 13:53:56 +01:00
Jake Turner
3b74e038d2
Assert for SPIRV Subgroup Ops that the subgroup is converged
2025-09-24 13:49:51 +01:00
Jake Turner
e5121962f3
Spirv Debugger control flow helper variable tweaks
...
Removed unused mergeBlock
Made control flow variables private with helper methods to get them
2025-09-24 13:46:00 +01:00
Jake Turner
c0b77c1d0c
Add thread safe SPIRV Debugger::AddDebugMessage()
...
Adds to an MT safe queue which is processed on the debugger device thread
Made ClampScalars static methods become Debugger helper member functions
2025-09-24 13:39:48 +01:00