-
Notifications
You must be signed in to change notification settings - Fork 12
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
Compute shader usability #94
Comments
@1 afaik there is lots of validation which e.g. prints unassigned inputs, etc. (maybe just disabled?) @2 can be achieved via @3 I tried optimizing the code in FShade but it's quite hard to do since there are many mutations to consider, so clearly these things would require substantial effort |
@1 Maybe in Vulkan, but in OpenGL I can comment half of my inputs and it still runs without a warning/error |
Initial implementation for the new compute task API See: #94
I've implemented a new compute task API in the
The new API is backwards compatible, so old compute-related code should just work. Unit tests are all green, but we still need to test this on some real projects. |
Compute shaders/tasks have a shadowy existence besides other shaders. A long-term goala should be to unify more of the code behind and make the usage consistent with other shaders/tasks (i.e. raytracing task).
I'm currently implementing a complex post-processing pipeline, that currently has 4 passes (shaders) with each having many inputs (main effect 27). A reoccurring pitfall is that there is no validation if all inputs are supplied when running the task. E.g. when I implement lots of new code and use a uniform input that I have already defined/used in another pass and then forget to also set the appropriate input when running the commands/task there is no warning or error.
The generated code also does not seem to get the same level of optimization as I'm used from other shaders. One particular issue is that I cannot use compile-time constant arguments to generate shader variants. Here is an example:
Results in:
So it generates a shader that requires "mode" as input (no input check/validation -> double fail).
Here is a list of improvements that we should consider:
map<Symbol, IAdaptiveValue>
) (NOTE: I would see this as nice to have)I've already mentioned some points to @hyazinthh and he could work on improvements when there is time. It would be nice to collect input from others on my suggestions and consider that there are already quite a lot of compute shaders in production usage and how we want to approach this.
The text was updated successfully, but these errors were encountered: