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

Shader compilation failed when implementing IComputeShader interface in a different way. #855

Closed
HoneyFox opened this issue Sep 19, 2024 · 2 comments · Fixed by #856
Closed
Labels
bug 🐛 Something isn't working

Comments

@HoneyFox
Copy link

Reproduction Steps

When writing a compute shader, use void IComputeShader.Execute() instead of public void Execute().

Expected Behavior

The shader should be compiled normally as if public void Execute() is used.

Actual Behavior

The compute shader cannot be compiled. Error reports as follows:

"The DXC compiler encountered one or more errors while trying to compile the shader: "error: expected external declaration [NumThreads(__GroupSize__get_X, __GroupSize__get_Y, __GroupSize__get_Z)] .". Make sure to only be using supported features by checking the README file in the ComputeSharp repository: https://github.com/Sergio0694/ComputeSharp. If you're sure that your C# shader code is valid, please open an issue an include a working repro and this error message."

System info

ComputeSharp 3.0.1
Windows 10
Visual Studio 2022 17.11.4, .NET 8.0

@HoneyFox HoneyFox added bug 🐛 Something isn't working untriaged 🧰 A new issue that needs initial triage labels Sep 19, 2024
@HoneyFox
Copy link
Author

HoneyFox commented Sep 19, 2024

It's not really a serious issue after all, just might be confusing for new users.

@Sergio0694 Sergio0694 removed the untriaged 🧰 A new issue that needs initial triage label Sep 21, 2024
@Sergio0694
Copy link
Owner

Ah, yeah agreed it'd be nice to support this scenario too, thank you for opening this! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants