Skip to content

Add support for dispatchWorkgroupsIndirect #30982

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

Open
HongchengZhao opened this issue Apr 23, 2025 · 1 comment
Open

Add support for dispatchWorkgroupsIndirect #30982

HongchengZhao opened this issue Apr 23, 2025 · 1 comment
Labels

Comments

@HongchengZhao
Copy link

Description

Now that drawIndirect is supported in WebGPURenderer, I think it is also helpful to add support for dipatching compute shaders indirectly.

Right now I have two compute shaders A and B. A's compute count is determined by B's output. So having the dispatchWorkgroupsIndirect feature would greatly help boost my application's performance.

Solution

Add a computeIndirect(indirect: IndirectStorageBufferAttribute) method to TSL Node class. And each ComputeNode can hold an indirect attribute, which can be used to dispatch workgroups indirectly.

Alternatives

N/A

Additional context

No response

@Mugen87 Mugen87 added the WebGPU label Apr 23, 2025
@Spiri0
Copy link
Contributor

Spiri0 commented Apr 27, 2025

I'm wondering what you mean by dispatch indirectly. Please help me understand it a little more clearly.
Are you looking for a higher-level TSL functionality? More automation?

@Mugen87 If this is @HongchengZhao's wish, the TSL label would be appropriate here, since the DrawIndirect functionality as I envisioned it with the compute shaders, buffers, structs and structArrays is fully functional since r176.

P.S. Ah, I see in the W3C docu. That's a wgsl command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants