Skip to content
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

Add compute shader indirect dispatch on Vulkan? #5844

Open
comradez opened this issue Dec 12, 2024 · 3 comments
Open

Add compute shader indirect dispatch on Vulkan? #5844

comradez opened this issue Dec 12, 2024 · 3 comments
Labels
Needs reporter feedback Bugs awaiting more information from the reporter

Comments

@comradez
Copy link

comradez commented Dec 12, 2024

The dispatchComputeIndirect for Vulkan compute encoder has always been unimplemented.

I am using Falcor on Linux and trying some indirect dispatched compute shaders. As the dispatchIndirect call from Falcor goes through slang-gfx to the backend, I guess the only way to make it work is to implement vk::ComputeCommandEncoder::dispatchComputeIndirect.

Given that there is an implementation for D3D12, is any reason why this remains unimplemented, and are there possibilities to implement it? Very thanks!

@bmillsNV bmillsNV added the Needs reporter feedback Bugs awaiting more information from the reporter label Dec 16, 2024
@bmillsNV
Copy link
Collaborator

@comradez this hasn't been implemented due to resource constraints. We are also moving to Slang-RHI as a replacement for slang-gfx. Can you try Slang-RHI repo instead and file an issue there for any gaps?

@comradez
Copy link
Author

comradez commented Dec 16, 2024

Thanks @bmillsNV for answering, but I can't do an easy switch for now as I'm using Falcor and I don't want to overhaul their codebase. For now I'll just do a read back to get things quickly done.

I'll keep an eye on the new RHI library, and do you have a roadmap for this? Thanks.

@AdamYuan
Copy link
Contributor

AdamYuan commented Dec 21, 2024

Hi @comradez , I've also encounter this issue recently. So I try to implement vk::ComputeCommandEncoder::dispatchComputeIndirect in a fork (https://github.com/AdamYuan/slang/tree/falcor-8.0-better-vk) and it turns out to be a perfect solution.

If you want to use the fork in Falcor (v8.0), simply replace

    <remote name="github-slang" type="https" packageLocation="github.com/shader-slang/slang/releases/download/v${version}/slang-${version}-${platform}.zip"/>
    <dependency name="slang" linkPath="external/packman/slang">
        <package name="slang" version="2024.1.34" remotes="github-slang" platforms="windows-x86_64 linux-x86_64"/>
    </dependency>

with

    <remote name="github-slang" type="https" packageLocation="github.com/AdamYuan/slang/releases/download/v${version}/slang-${version}-${platform}.zip"/>
    <dependency name="slang" linkPath="external/packman/slang">
        <package name="slang" version="2024.1.34-better-vk" remotes="github-slang" platforms="windows-x86_64 linux-x86_64"/>
    </dependency>

in dependencies.xml and refresh the packman cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs reporter feedback Bugs awaiting more information from the reporter
Projects
None yet
Development

No branches or pull requests

3 participants