-
Notifications
You must be signed in to change notification settings - Fork 242
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
[docs] Admonish slangc entry points / shader attributes #6033
base: master
Are you sure you want to change the base?
Conversation
Admonish the related non-functional compilation command in the reference manual until shader-slang#5541 is addressed.
docs/user-guide/08-compiling.md
Outdated
> The `slangc` CLI [does not currently support](https://github.com/shader-slang/slang/issues/5541) `[shader(...)]` attributes. Complile the above example with the following command instead: | ||
> | ||
> ```bat | ||
> slangc hello-world.slang -target spirv -entry computeMain -o hello-world.spv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not completely true though. slangc hello-world.slang -target spirv
should work just fine. You need to specify the entry point explicitly only when targeting HLSL and GLSL, but not SPIRV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, I use this feature regularly. Might be good to clarify what does or doesn't work, but slangc does support at least some mixed entry point work.
I thought at one point we discussed supporting mixed entry points via partially-compiled slang modules too. I haven't really investigated this though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
@@ -179,6 +179,13 @@ we can compile the `computeMain()` entry point to SPIR-V using the following com | |||
slangc hello-world.slang -target spirv -o hello-world.spv | |||
``` | |||
|
|||
> #### Note #### | |||
> The `slangc` CLI [does not currently support](https://github.com/shader-slang/slang/issues/5541) `[shader(...)]` attributes for targets other than SPIRV. For other targets, the `-entry` argument is mandatory. Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is accurate to say slangc
doesn't support [shader()]
attribute because shaders with [shader()]
attribute will be correctly compiled by slangc and the attribute will be reflected in the resulting code.
It is just that for targets without multi-entrypoint support, -stage
or -profile
argument is still needed even if the shader contains [shader()]
attribute when using slangc
.
Admonish the related non-functional compilation command in the reference manual until #5541 is addressed.