Skip to content

PLAYGROUND NEVER MERGE: Playground/workgroup debugger #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 35 commits into
base: v1.x
Choose a base branch
from

Conversation

Zorro666
Copy link
Owner

@Zorro666 Zorro666 commented Apr 6, 2025

No description provided.

@Zorro666 Zorro666 force-pushed the playground/workgroup-debugger branch 6 times, most recently from 58d8d57 to 6c4789d Compare April 7, 2025 09:10
@Zorro666 Zorro666 force-pushed the playground/workgroup-debugger branch 8 times, most recently from 094a041 to e78a5be Compare April 12, 2025 11:34
@Zorro666 Zorro666 force-pushed the playground/workgroup-debugger branch 4 times, most recently from 2b1bcf9 to daeff53 Compare April 18, 2025 11:20
@Zorro666 Zorro666 force-pushed the playground/workgroup-debugger branch 6 times, most recently from 915ac09 to 6eb868b Compare April 28, 2025 13:21
@Zorro666 Zorro666 force-pushed the playground/workgroup-debugger branch 3 times, most recently from 3c4bfa9 to ed5854f Compare May 5, 2025 13:49
@Zorro666 Zorro666 force-pushed the playground/workgroup-debugger branch from dbf63f2 to 0bd8148 Compare May 7, 2025 10:05
Zorro666 added 29 commits August 8, 2025 07:15
Useful for multi-threaded use of VulkanCreationInfo to guarantee it can't be accidentally mutated.

Primary usage is for SPRIV shader debugging.

Change existing VulkanDebugManager helpers to use the new helpers
Adds to an MT safe queue which is processed on the debugger device thread
Made ClampScalars static methods become Debugger helper member functions
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.
Disabled by default : controlled by a debug config option
More parts of apiWrapper and Debugger APIs need converting to be queued operations which run on the debugger thread and not on the Thread simulation thread
The Debugger APIs run on the device thread if required,

FillInputValue(), ReadTexel(), WriteTexel()
Add read/write locking for containers "usedNames" and "dynamicNames"
Mark any pointer writes that require a callback to run on the device thread
ThreadState

  DeviceOpResult ReadPointerValue(Id pointer, ShaderVariable &ret);

Debugger

  DeviceOpResult ReadFromPointer(const ShaderVariable &ptr, ShaderVariable &ret) const;
  DeviceOpResult GetPointerValue(const ShaderVariable &v, ShaderVariable &ret) const;
Run EnterFunction(), EnterEntryPoint(), ProcessScopeChange() on device thread
Removes need for a copy in job creation and removes need for activeMask member in ActiveTangleData
@Zorro666 Zorro666 force-pushed the playground/workgroup-debugger branch from 5ba9e1f to 509fc25 Compare August 8, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant