diff options
| author | ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 2025-05-21 21:11:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-22 04:11:01 +0000 |
| commit | 27c6e9b01f7386263bde90e16812be46327015c2 (patch) | |
| tree | a640d6882da0c9ee90ef64872b1b94c721039cdf /docs/command-line-slangc-reference.md | |
| parent | 21346ded32be9091389ca53815c1ba56feff8a01 (diff) | |
Initial `dyn` keyword support & `-lang 2026` compiler option (#7172)
fixes: [#7143](https://github.com/shader-slang/slang/issues/7143)
fixes: [#7146](https://github.com/shader-slang/slang/issues/7146)
Goal of PR:
* This PR is part of the larger #7115 refactor to how dynamic dispatch works.
* The first step is to add the `-std <std-revision>` flag.
* The second step is to provide basic `dyn` keyword support in AST. This does not include `varDecl` support since most of these interactions require `some` keyword support.
Future PR(s) goal:
* Support `some` keyword in AST. With this we will also implement all varDecl interactions between `dyn` and `some`.
* Add IR support for `some` and `dyn`.
Breakdown of PR:
* most of the logic is in `validateDyn.*`. This was done so that in the future when we implement more features we will have an easy time removing/adding restrictions to `dyn` interfaces.
Breaking changes:
* As per spec (https://github.com/shader-slang/spec/pull/14/files), any type conforming to a `dyn` interface errors if member list contains one of the following: opaque type, non copyable type, or unsized type.
* Due to the breaking change, the test `tests\compute\dynamic-dispatch-bindless-texture.slang` is incorrect. This has been fixed.
Diffstat (limited to 'docs/command-line-slangc-reference.md')
| -rw-r--r-- | docs/command-line-slangc-reference.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/command-line-slangc-reference.md b/docs/command-line-slangc-reference.md index 89e7f0b4c..d0e94a622 100644 --- a/docs/command-line-slangc-reference.md +++ b/docs/command-line-slangc-reference.md @@ -22,6 +22,7 @@ slangc -help-style markdown -h * [Deprecated](#Deprecated) * [compiler](#compiler) * [language](#language) +* [std-revision](#std-revision) * [archive-type](#archive-type) * [line-directive-mode](#line-directive-mode) * [debug-info-format](#debug-info-format) @@ -223,6 +224,14 @@ Display the build version. This is the contents of git describe --tags. It is typically only set from automated builds(such as distros available on github).A user build will by default be 'unknown'. +<a id="std"></a> +### -std + +**-std <[std-revision](#std-revision)>** + +Specifies the language standard that should be used. + + <a id="warnings-as-errors"></a> ### -warnings-as-errors @@ -742,6 +751,11 @@ Enable GLSL as an input language. Enable experimental compiler passes +<a id="enable-experimental-dynamic-dispatch"></a> +### -enable-experimental-dynamic-dispatch +Enable experimental dynamic dispatch features + + <a id="embed-downstream-ir"></a> ### -embed-downstream-ir Embed downstream IR into emitted slang IR @@ -884,6 +898,15 @@ Language * `hlsl` : HLSL language * `cu`, `cuda` : CUDA +<a id="std-revision"></a> +## std-revision + +Std Revision + +* `unknown` : Unknown +* `2025`, `default` : Slang language rules for 2025 and older +* `2026` : Slang language rules for 2026 and newer + <a id="archive-type"></a> ## archive-type |
