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

[docs] Admonish slangc entry points / shader attributes #6033

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/user-guide/08-compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. Complile the above example with the following command instead:
>
> ```bat
> slangc hello-world.slang -target spirv -entry computeMain -o hello-world.spv
> ```

### Source Files and Translation Units

The `hello-world.slang` argument here is specifying an input file.
Expand All @@ -195,6 +202,9 @@ If multiple source files are passed to `slangc`, they will be grouped into trans

### Entry Points

> #### Note ####
> This feature of `slangc` [is planned but not implemented](https://github.com/shader-slang/slang/issues/5541).

When using `slangc`, you will typically want to identify which entry point(s) you intend to compile.
The `-entry computeMain` option selects an entry point to be compiled to output code in this invocation of `slangc`.

Expand Down