summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/_config.yml2
-rw-r--r--docs/scripts/Program.cs6
-rw-r--r--docs/user-guide/00-introduction.md1
-rw-r--r--docs/user-guide/01-get-started.md1
-rw-r--r--docs/user-guide/02-conventional-features.md1
-rw-r--r--docs/user-guide/03-convenience-features.md1
-rw-r--r--docs/user-guide/04-modules-and-access-control.md1
-rw-r--r--docs/user-guide/05-capabilities.md143
-rw-r--r--docs/user-guide/06-interfaces-generics.md (renamed from docs/user-guide/05-interfaces-generics.md)1
-rw-r--r--docs/user-guide/07-autodiff.md (renamed from docs/user-guide/08-autodiff.md)1
-rw-r--r--docs/user-guide/08-compiling.md (renamed from docs/user-guide/06-compiling.md)1
-rw-r--r--docs/user-guide/09-targets.md (renamed from docs/user-guide/07-targets.md)1
-rw-r--r--docs/user-guide/a1-02-slangpy.md4
-rw-r--r--docs/user-guide/toc.html160
14 files changed, 247 insertions, 77 deletions
diff --git a/docs/_config.yml b/docs/_config.yml
index 259a24e4d..72d781d70 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -1 +1 @@
-theme: jekyll-theme-tactile \ No newline at end of file
+theme: jekyll-theme-tactile
diff --git a/docs/scripts/Program.cs b/docs/scripts/Program.cs
index d7f4ef623..d543f399e 100644
--- a/docs/scripts/Program.cs
+++ b/docs/scripts/Program.cs
@@ -164,6 +164,12 @@ namespace toc
node.sections.Add(sectionStr);
node.sectionShortTitles.Add(maybeGetShortTitle(sectionStr, content, i));
}
+ if (content[i].StartsWith("permalink:"))
+ {
+ var prefixLength = ("permalink:").Length;
+ var permaPath = content[i].Substring(prefixLength, content[i].Length - prefixLength).Trim();
+ node.fileID = Path.GetFileName(permaPath);
+ }
}
if (node.title == null)
{
diff --git a/docs/user-guide/00-introduction.md b/docs/user-guide/00-introduction.md
index a77a63a8f..07b860d9c 100644
--- a/docs/user-guide/00-introduction.md
+++ b/docs/user-guide/00-introduction.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/introduction
---
Introduction
diff --git a/docs/user-guide/01-get-started.md b/docs/user-guide/01-get-started.md
index 27ac956d0..a7cf2ddf1 100644
--- a/docs/user-guide/01-get-started.md
+++ b/docs/user-guide/01-get-started.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/get-started
---
# Getting Started with Slang
diff --git a/docs/user-guide/02-conventional-features.md b/docs/user-guide/02-conventional-features.md
index 0f7efd2b9..4faa6607b 100644
--- a/docs/user-guide/02-conventional-features.md
+++ b/docs/user-guide/02-conventional-features.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/conventional-features
---
Conventional Language Features
diff --git a/docs/user-guide/03-convenience-features.md b/docs/user-guide/03-convenience-features.md
index 2aea1fdff..948400731 100644
--- a/docs/user-guide/03-convenience-features.md
+++ b/docs/user-guide/03-convenience-features.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/convenience-features
---
# Basic Convenience Features
diff --git a/docs/user-guide/04-modules-and-access-control.md b/docs/user-guide/04-modules-and-access-control.md
index 68e2d06c7..e1976effb 100644
--- a/docs/user-guide/04-modules-and-access-control.md
+++ b/docs/user-guide/04-modules-and-access-control.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/modules
---
Modules and Access Control
diff --git a/docs/user-guide/05-capabilities.md b/docs/user-guide/05-capabilities.md
new file mode 100644
index 000000000..c20a43c75
--- /dev/null
+++ b/docs/user-guide/05-capabilities.md
@@ -0,0 +1,143 @@
+---
+layout: user-guide
+permalink: /user-guide/capabilities
+---
+
+# Capabilities
+
+One of the biggest challenges in maintaining cross-platform shader code is to manage the differences in hardware capabilities across different GPUs, graphics APIs, and shader stages.
+Each graphics API or shader stage may expose operations that are not available on other platforms. Instead of restricting Slang's features to the lowest common denominator of different platforms,
+Slang exposes operations from all target platforms to allow the user to take maximum advantage on a specific target.
+
+A consequence of this approach is that the user is now responsible for maintaining compatibility of their code. For example, if the user writes code that uses a Vulkan extension currently not
+available on D3D/HLSL, they will get an error when attempting to compile that code to D3D.
+
+To help the user to maintain compatibility of their shader code on platforms matter to their applications, Slang's type system can now infer and enforce capability requirements
+to provide assurance that the shader code will be compatible with the specific set of platforms before compiling for that platform.
+
+For example, `Texture2D.SampleCmp` is available on D3D and Vulkan, but not available on CUDA. If the user is intended to write cross-platform code that targets CUDA, they will
+receive a type-checking error when attempting to use `SampleCmp` before the code generation stage of compilation. When using Slang's intellisense plugin, the programmer should
+get a diagnostic message directly in their code editor.
+
+As another example, `discard` is a statement that is only meaningful when used in fragment shaders. If a vertex shader contains a `discard` statement or calling a function that contains
+a `discard` statement, it shall be a type-check error.
+
+## Capability Atoms and Capability Requirements
+
+Slang models code generation targets, shader stages, API extensions and hardware features as distinct capability atoms. For example, `GLSL_460` is a capability atom that stands for the GLSL 460 code generation target,
+`compute` is an atom that represents the compute shader stage, `_sm_6_7` is an atom representing the shader model 6.7 feature set in D3D, `SPV_KHR_ray_tracing` is an atom representing the `SPV_KHR_ray_tracing` SPIR-V extension, and `spvShaderClockKHR` is an atom for the `ShaderClockKHR` SPIRV capability. For a complete list of capabilities supported by the Slang compiler, check the [capability definition file](https://github.com/shader-slang/slang/blob/master/source/slang/slang-capabilities.capdef).
+
+A capabiltiy **requirement** can be a single capability atom, a conjunction of capability atoms, or a disjunction of conjunction of capability atoms. A function can declare its
+capability requirement with the following syntax:
+
+```csharp
+[require(spvShaderClockKHR)]
+[require(glsl, GL_EXT_shader_realtime_clock)]
+[require(hlsl_nvapi)]
+uint2 getClock() {...}
+```
+
+Each `[require]` attribute declares a conjunction of capability atoms, and all `[require]` attributes form the final requirement of the `getClock()` function as a disjunction of capabilities:
+```
+(spvShaderClockKHR | glsl + GL_EXT_shader_realtime_clock | hlsl_nvapi)
+```
+
+A capability can __imply__ other capabilities. Here `spvShaderClockKHR` is a capability that implies `SPV_KHR_shader_clock`, which represents the SPIRV `SPV_KHR_shader_clock` extension, and the `SPV_KHR_shader_clock` capability implies `spirv_1_0`, which stands for the spirv code generation target.
+
+When evaluating capability requirements, Slang will expand all implications. Therefore the final capability requirement for `getClock` is:
+```
+ spirv_1_0 + SPV_KHR_shader_clock + spvShaderClockKHR
+| glsl + _GL_EXT_shader_realtime_clock
+| hlsl + hlsl_nvapi
+```
+Which means the function can be called from locations where the `spvShaderClockKHR` capability is available (when targeting SPIRV), or where the `GL_EXT_shader_realtime_clock` extension is available when targeting GLSL,
+or where `nvapi` is available when targeting HLSL.
+
+## Conflicting Capabilities
+
+Certain groups of capabilities are mutually exclusive such that only one capability in the group is allowed to exist. For example, all stage capabilities are mutual exclusive: a requirement for both `fragment` and `vertex` is impossible to satisfy. Currently, capabilities that model different code generation targets (e.g. `hlsl`, `glsl`) or different shader stages (`vertex`, `fragment`, etc.) are mutually exclusive within
+their corresponding group.
+
+If two capability requirements contain different atoms that are conflicting with each other, these two requirements are considered __incompatible__.
+For example, requirement `spvShaderClockKHR + fragment` and requirement `spvShaderClockKHR + vertex` are incompatible, because `fragment` conflicts with `vertex`.
+
+## Requirements in Parent Scope
+
+The capability requirement of a decl is always joined with the requirements declared in its parents.
+For example:
+```csharp
+[require(spvShaderClockKHR)]
+struct MyType
+{
+ [require(spvShaderClockKHR)]
+ void method() { ... }
+}
+```
+`MyType.method` has requirement `spvShaderClockKHR + spvShaderClockKHR`.
+
+## Inferrence of Capability Requirements
+
+By default, Slang will infer the capability requirements of a function given its definition, as long as the function has `internal` or `private` visibilty. For example, given:
+```csharp
+void myFunc()
+{
+ if (getClock().x % 1000 == 0)
+ discard;
+}
+```
+Slang will automatically deduce that `myFunc` has capability
+```
+ spirv_1_0 + SPV_KHR_shader_clock + spvShaderClockKHR + fragment
+| glsl + _GL_EXT_shader_realtime_clock + fragment
+| hlsl + hlsl_nvapi + fragment
+```
+Since `discard` statement requires capability `fragment`.
+
+## Inferrence on target_switch
+
+A `__target_switch` statement will introduce disjunctions in its inferred capabiltiy requirement. For example:
+```csharp
+void myFunc()
+{
+ __target_switch
+ {
+ case spirv: ...;
+ case hlsl: ...;
+ }
+}
+```
+The capability requirement of `myFunc` is `(spirv | hlsl)`, meaning that the function can be called from a context where either `spirv` or `hlsl` capability
+is available.
+
+## Capability Aliases
+
+To make it easy to specify capabilities on different platforms, Slang also defines many aliases that can be used in `[require]` attributes.
+For example, Slang declares:
+```
+alias sm_6_6 = _sm_6_6
+ | glsl_spirv_1_5 + sm_6_5
+ + GL_EXT_shader_atomic_int64 + atomicfloat2
+ | spirv_1_5 + sm_6_5
+ + GL_EXT_shader_atomic_int64 + atomicfloat2
+ + SPV_EXT_descriptor_indexing
+ | cuda
+ | cpp;
+```
+So user code can write `[require(sm_6_6)]` to mean that the function requires shader model 6.6 on D3D or equivalent set of GLSL/SPIRV extensions when targeting GLSL or SPIRV.
+Note that in the above definition, `GL_EXT_shader_atomic_int64` is also an alias that is defined as:
+```
+alias GL_EXT_shader_atomic_int64 = _GL_EXT_shader_atomic_int64 | spvInt64Atomics;
+```
+Where `_GL_EXT_shader_atomic_int64` is the atom that represent the true `GL_EXT_shader_atomic_int64` GLSL extension.
+The `GL_EXT_shader_atomic_int64` alias is defined as a disjunction of `_GL_EXT_shader_atomic_int64` and the `Int64Atomics` SPIRV capability so that
+it can be used in both the contexts of GLSL and SPIRV target.
+
+When aliases are used in a `[require]` attribute, the compiler will expand the alias to evaluate the capability set, and remove all incompatible conjunctions.
+For example, `[require(hlsl, sm_6_6)]` will be evaluated to `(hlsl+_sm_6_6)` because all other conjunctions in `sm_6_6` are incompatible with `hlsl`.
+
+## Validation of Capability Requirements
+
+Slang requires all public methods and interface methods to have explicit capability requirements declarations. Omitting capability declaration on a public method means that the method does not require any
+specific capability. Functions with explicit requirement declarations will be verified by the compiler to ensure that it does not use any capability beyond what is declared.
+
+Slang recommends but does not require explicit declaration of capability requirements for entrypoints. If explicit capability requirements are declared on an entrypoint, they will be used to validate the entrypoint the same way as other public methods, providing assurance that the function will work on all intended targets. If an entrypoint does not define explicit capability requirements, Slang will infer the requirements, and only issue a compiler error when the inferred capability is incompatible with the current code generation target.
diff --git a/docs/user-guide/05-interfaces-generics.md b/docs/user-guide/06-interfaces-generics.md
index 94a08714e..59a0352fa 100644
--- a/docs/user-guide/05-interfaces-generics.md
+++ b/docs/user-guide/06-interfaces-generics.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/interfaces-generics
---
Interfaces and Generics
diff --git a/docs/user-guide/08-autodiff.md b/docs/user-guide/07-autodiff.md
index a2a06b64b..b3a25358c 100644
--- a/docs/user-guide/08-autodiff.md
+++ b/docs/user-guide/07-autodiff.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/autodiff
---
# Automatic Differentiation
diff --git a/docs/user-guide/06-compiling.md b/docs/user-guide/08-compiling.md
index daeefc0e6..861da962e 100644
--- a/docs/user-guide/06-compiling.md
+++ b/docs/user-guide/08-compiling.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/compiling
---
Compiling Code with Slang
diff --git a/docs/user-guide/07-targets.md b/docs/user-guide/09-targets.md
index 68f18cc9e..d6dfd4cf6 100644
--- a/docs/user-guide/07-targets.md
+++ b/docs/user-guide/09-targets.md
@@ -1,5 +1,6 @@
---
layout: user-guide
+permalink: /user-guide/targets
---
Supported Compilation Targets
diff --git a/docs/user-guide/a1-02-slangpy.md b/docs/user-guide/a1-02-slangpy.md
index bebdb06f4..bee514c55 100644
--- a/docs/user-guide/a1-02-slangpy.md
+++ b/docs/user-guide/a1-02-slangpy.md
@@ -153,7 +153,7 @@ print(output_grad)
`slangpy` also binds the forward-mode version of your kernel (propagate derivatives of inputs to the output) which can be invoked the same way using `module.square.fwd()`
-You can refer to [this documentation](08-autodiff.md) for a detailed reference of Slang's automatic differentiation feature.
+You can refer to [this documentation](autodiff) for a detailed reference of Slang's automatic differentiation feature.
### Wrapping your kernels as pytorch functions
@@ -451,7 +451,7 @@ in the `inputGradToPropagateTo` tensor. Therefore, after running `boxFilter_bwd`
back propagated derivative values.
Again, to understand all the details of the automatic differentiation system, please refer to the
-[Automatic Differentiation](08-autodiff.md) chapter for a detailed explanation.
+[Automatic Differentiation](autodiff) chapter for a detailed explanation.
## Manually binding kernels
`[AutoPyBindCUDA]` works for most use cases, but in certain situations, it may be necessary to write the *host* function by hand. The host function can also be written in Slang, and `slangpy` handles its compilation to C++.
diff --git a/docs/user-guide/toc.html b/docs/user-guide/toc.html
index dceca681f..9e8c6f57d 100644
--- a/docs/user-guide/toc.html
+++ b/docs/user-guide/toc.html
@@ -1,104 +1,116 @@
<ul class="toc_root_list"><li data-link="index"><span>Slang User's Guide</span>
<ul class="toc_list">
-<li data-link="00-introduction"><span>Introduction</span>
+<li data-link="introduction"><span>Introduction</span>
<ul class="toc_list">
-<li data-link="00-introduction#why-use-slang"><span>Why use Slang?</span></li>
-<li data-link="00-introduction#who-is-slang-for"><span>Who is Slang for?</span></li>
-<li data-link="00-introduction#who-is-this-guide-for"><span>Who is this guide for?</span></li>
-<li data-link="00-introduction#goals-and-non-goals"><span>Goals and Non-Goals</span></li>
+<li data-link="introduction#why-use-slang"><span>Why use Slang?</span></li>
+<li data-link="introduction#who-is-slang-for"><span>Who is Slang for?</span></li>
+<li data-link="introduction#who-is-this-guide-for"><span>Who is this guide for?</span></li>
+<li data-link="introduction#goals-and-non-goals"><span>Goals and Non-Goals</span></li>
</ul>
</li>
-<li data-link="01-get-started"><span>Getting Started with Slang</span>
+<li data-link="get-started"><span>Getting Started with Slang</span>
<ul class="toc_list">
-<li data-link="01-get-started#installation"><span>Installation</span></li>
-<li data-link="01-get-started#your-first-slang-shader"><span>Your first Slang shader</span></li>
-<li data-link="01-get-started#the-full-example"><span>The full example</span></li>
+<li data-link="get-started#installation"><span>Installation</span></li>
+<li data-link="get-started#your-first-slang-shader"><span>Your first Slang shader</span></li>
+<li data-link="get-started#the-full-example"><span>The full example</span></li>
</ul>
</li>
-<li data-link="02-conventional-features"><span>Conventional Language Features</span>
+<li data-link="conventional-features"><span>Conventional Language Features</span>
<ul class="toc_list">
-<li data-link="02-conventional-features#types"><span>Types</span></li>
-<li data-link="02-conventional-features#expressions"><span>Expressions</span></li>
-<li data-link="02-conventional-features#statements"><span>Statements</span></li>
-<li data-link="02-conventional-features#functions"><span>Functions</span></li>
-<li data-link="02-conventional-features#preprocessor"><span>Preprocessor</span></li>
-<li data-link="02-conventional-features#attributes"><span>Attributes</span></li>
-<li data-link="02-conventional-features#global-variables-and-shader-parameters"><span>Global Variables and Shader Parameters</span></li>
-<li data-link="02-conventional-features#shader-entry-points"><span>Shader Entry Points</span></li>
+<li data-link="conventional-features#types"><span>Types</span></li>
+<li data-link="conventional-features#expressions"><span>Expressions</span></li>
+<li data-link="conventional-features#statements"><span>Statements</span></li>
+<li data-link="conventional-features#functions"><span>Functions</span></li>
+<li data-link="conventional-features#preprocessor"><span>Preprocessor</span></li>
+<li data-link="conventional-features#attributes"><span>Attributes</span></li>
+<li data-link="conventional-features#global-variables-and-shader-parameters"><span>Global Variables and Shader Parameters</span></li>
+<li data-link="conventional-features#shader-entry-points"><span>Shader Entry Points</span></li>
+<li data-link="conventional-features#mixed-shader-entry-points"><span>Mixed Shader Entry Points</span></li>
</ul>
</li>
-<li data-link="03-convenience-features"><span>Basic Convenience Features</span>
+<li data-link="convenience-features"><span>Basic Convenience Features</span>
<ul class="toc_list">
-<li data-link="03-convenience-features#type-inference-in-variable-definitions"><span>Type Inference in Variable Definitions</span></li>
-<li data-link="03-convenience-features#immutable-values"><span>Immutable Values</span></li>
-<li data-link="03-convenience-features#namespaces"><span>Namespaces</span></li>
-<li data-link="03-convenience-features#member-functions"><span>Member functions</span></li>
-<li data-link="03-convenience-features#properties"><span>Properties</span></li>
-<li data-link="03-convenience-features#initializers"><span>Initializers</span></li>
-<li data-link="03-convenience-features#operator-overloading"><span>Operator Overloading</span></li>
-<li data-link="03-convenience-features#subscript-operator"><span>Subscript Operator</span></li>
-<li data-link="03-convenience-features#optionalt-type"><span>`Optional&lt;T&gt;` type</span></li>
-<li data-link="03-convenience-features#reinterprett-operation"><span>`reinterpret&lt;T&gt;` operation</span></li>
-<li data-link="03-convenience-features#struct-inheritance-limited"><span>`struct` inheritance (limited)</span></li>
-<li data-link="03-convenience-features#extensions"><span>Extensions</span></li>
-<li data-link="03-convenience-features#multi-level-break"><span>Multi-level break</span></li>
-<li data-link="03-convenience-features#force-inlining"><span>Force inlining</span></li>
-<li data-link="03-convenience-features#special-scoping-syntax"><span>Special Scoping Syntax</span></li>
+<li data-link="convenience-features#type-inference-in-variable-definitions"><span>Type Inference in Variable Definitions</span></li>
+<li data-link="convenience-features#immutable-values"><span>Immutable Values</span></li>
+<li data-link="convenience-features#namespaces"><span>Namespaces</span></li>
+<li data-link="convenience-features#member-functions"><span>Member functions</span></li>
+<li data-link="convenience-features#properties"><span>Properties</span></li>
+<li data-link="convenience-features#initializers"><span>Initializers</span></li>
+<li data-link="convenience-features#operator-overloading"><span>Operator Overloading</span></li>
+<li data-link="convenience-features#subscript-operator"><span>Subscript Operator</span></li>
+<li data-link="convenience-features#optionalt-type"><span>`Optional&lt;T&gt;` type</span></li>
+<li data-link="convenience-features#reinterprett-operation"><span>`reinterpret&lt;T&gt;` operation</span></li>
+<li data-link="convenience-features#struct-inheritance-limited"><span>`struct` inheritance (limited)</span></li>
+<li data-link="convenience-features#extensions"><span>Extensions</span></li>
+<li data-link="convenience-features#multi-level-break"><span>Multi-level break</span></li>
+<li data-link="convenience-features#force-inlining"><span>Force inlining</span></li>
+<li data-link="convenience-features#special-scoping-syntax"><span>Special Scoping Syntax</span></li>
</ul>
</li>
-<li data-link="04-modules-and-access-control"><span>Modules and Access Control</span>
+<li data-link="modules"><span>Modules and Access Control</span>
<ul class="toc_list">
-<li data-link="04-modules-and-access-control#defining-a-module"><span>Defining a Module</span></li>
-<li data-link="04-modules-and-access-control#importing-a-module"><span>Importing a Module</span></li>
-<li data-link="04-modules-and-access-control#access-control"><span>Access Control</span></li>
-<li data-link="04-modules-and-access-control#legacy-modules"><span>Legacy Modules</span></li>
+<li data-link="modules#defining-a-module"><span>Defining a Module</span></li>
+<li data-link="modules#importing-a-module"><span>Importing a Module</span></li>
+<li data-link="modules#access-control"><span>Access Control</span></li>
+<li data-link="modules#legacy-modules"><span>Legacy Modules</span></li>
</ul>
</li>
-<li data-link="05-interfaces-generics"><span>Interfaces and Generics</span>
+<li data-link="capabilities"><span>Capabilities</span>
<ul class="toc_list">
-<li data-link="05-interfaces-generics#interfaces"><span>Interfaces</span></li>
-<li data-link="05-interfaces-generics#generics"><span>Generics</span></li>
-<li data-link="05-interfaces-generics#supported-constructs-in-interface-definitions"><span>Supported Constructs in Interface Definitions</span></li>
-<li data-link="05-interfaces-generics#associated-types"><span>Associated Types</span></li>
-<li data-link="05-interfaces-generics#generic-value-parameters"><span>Generic Value Parameters</span></li>
-<li data-link="05-interfaces-generics#interface-typed-values"><span>Interface-typed Values</span></li>
-<li data-link="05-interfaces-generics#extending-a-type-with-additional-interface-conformances"><span>Extending a Type with Additional Interface Conformances</span></li>
-<li data-link="05-interfaces-generics#is-and-as-operator"><span>`is` and `as` Operator</span></li>
-<li data-link="05-interfaces-generics#extensions-to-interfaces"><span>Extensions to Interfaces</span></li>
+<li data-link="capabilities#capability-atoms-and-capability-requirements"><span>Capability Atoms and Capability Requirements</span></li>
+<li data-link="capabilities#conflicting-capabilities"><span>Conflicting Capabilities</span></li>
+<li data-link="capabilities#requirements-in-parent-scope"><span>Requirements in Parent Scope</span></li>
+<li data-link="capabilities#inferrence-of-capability-requirements"><span>Inferrence of Capability Requirements</span></li>
+<li data-link="capabilities#inferrence-on-target-switch"><span>Inferrence on target_switch</span></li>
+<li data-link="capabilities#capability-aliases"><span>Capability Aliases</span></li>
+<li data-link="capabilities#validation-of-capability-requirements"><span>Validation of Capability Requirements</span></li>
</ul>
</li>
-<li data-link="06-compiling"><span>Compiling Code with Slang</span>
+<li data-link="interfaces-generics"><span>Interfaces and Generics</span>
<ul class="toc_list">
-<li data-link="06-compiling#concepts"><span>Concepts</span></li>
-<li data-link="06-compiling#command-line-compilation-with-slangc"><span>Command-Line Compilation with `slangc`</span></li>
-<li data-link="06-compiling#using-the-compilation-api"><span>Using the Compilation API</span></li>
+<li data-link="interfaces-generics#interfaces"><span>Interfaces</span></li>
+<li data-link="interfaces-generics#generics"><span>Generics</span></li>
+<li data-link="interfaces-generics#supported-constructs-in-interface-definitions"><span>Supported Constructs in Interface Definitions</span></li>
+<li data-link="interfaces-generics#associated-types"><span>Associated Types</span></li>
+<li data-link="interfaces-generics#generic-value-parameters"><span>Generic Value Parameters</span></li>
+<li data-link="interfaces-generics#interface-typed-values"><span>Interface-typed Values</span></li>
+<li data-link="interfaces-generics#extending-a-type-with-additional-interface-conformances"><span>Extending a Type with Additional Interface Conformances</span></li>
+<li data-link="interfaces-generics#is-and-as-operator"><span>`is` and `as` Operator</span></li>
+<li data-link="interfaces-generics#extensions-to-interfaces"><span>Extensions to Interfaces</span></li>
</ul>
</li>
-<li data-link="07-targets"><span>Supported Compilation Targets</span>
+<li data-link="autodiff"><span>Automatic Differentiation</span>
<ul class="toc_list">
-<li data-link="07-targets#background-and-terminology"><span>Background and Terminology</span></li>
-<li data-link="07-targets#direct3d-11"><span>Direct3D 11</span></li>
-<li data-link="07-targets#direct3d-12"><span>Direct3D 12</span></li>
-<li data-link="07-targets#vulkan"><span>Vulkan</span></li>
-<li data-link="07-targets#opengl"><span>OpenGL</span></li>
-<li data-link="07-targets#cuda-and-optix"><span>CUDA and OptiX</span></li>
-<li data-link="07-targets#cpu-compute"><span>CPU Compute</span></li>
-<li data-link="07-targets#summary"><span>Summary</span></li>
+<li data-link="autodiff#using-automatic-differentiation-in-slang"><span>Using Automatic Differentiation in Slang</span></li>
+<li data-link="autodiff#mathematic-concepts-and-terminologies"><span>Mathematic Concepts and Terminologies</span></li>
+<li data-link="autodiff#differentiable-types"><span>Differentiable Types</span></li>
+<li data-link="autodiff#forward-derivative-propagation-function"><span>Forward Derivative Propagation Function</span></li>
+<li data-link="autodiff#backward-derivative-propagation-function"><span>Backward Derivative Propagation Function</span></li>
+<li data-link="autodiff#builtin-differentiable-functions"><span>Builtin Differentiable Functions</span></li>
+<li data-link="autodiff#primal-substitute-functions"><span>Primal Substitute Functions</span></li>
+<li data-link="autodiff#working-with-mixed-differentiable-and-non-differentiable-code"><span>Working with Mixed Differentiable and Non-Differentiable Code</span></li>
+<li data-link="autodiff#higher-order-differentiation"><span>Higher Order Differentiation</span></li>
+<li data-link="autodiff#interactions-with-generics-and-interfaces"><span>Interactions with Generics and Interfaces</span></li>
+<li data-link="autodiff#restrictions-of-automatic-differentiation"><span>Restrictions of Automatic Differentiation</span></li>
</ul>
</li>
-<li data-link="08-autodiff"><span>Automatic Differentiation</span>
+<li data-link="compiling"><span>Compiling Code with Slang</span>
<ul class="toc_list">
-<li data-link="08-autodiff#using-automatic-differentiation-in-slang"><span>Using Automatic Differentiation in Slang</span></li>
-<li data-link="08-autodiff#mathematic-concepts-and-terminologies"><span>Mathematic Concepts and Terminologies</span></li>
-<li data-link="08-autodiff#differentiable-types"><span>Differentiable Types</span></li>
-<li data-link="08-autodiff#forward-derivative-propagation-function"><span>Forward Derivative Propagation Function</span></li>
-<li data-link="08-autodiff#backward-derivative-propagation-function"><span>Backward Derivative Propagation Function</span></li>
-<li data-link="08-autodiff#builtin-differentiable-functions"><span>Builtin Differentiable Functions</span></li>
-<li data-link="08-autodiff#primal-substitute-functions"><span>Primal Substitute Functions</span></li>
-<li data-link="08-autodiff#working-with-mixed-differentiable-and-non-differentiable-code"><span>Working with Mixed Differentiable and Non-Differentiable Code</span></li>
-<li data-link="08-autodiff#higher-order-differentiation"><span>Higher Order Differentiation</span></li>
-<li data-link="08-autodiff#interactions-with-generics-and-interfaces"><span>Interactions with Generics and Interfaces</span></li>
-<li data-link="08-autodiff#restrictions-of-automatic-differentiation"><span>Restrictions of Automatic Differentiation</span></li>
+<li data-link="compiling#concepts"><span>Concepts</span></li>
+<li data-link="compiling#command-line-compilation-with-slangc"><span>Command-Line Compilation with `slangc`</span></li>
+<li data-link="compiling#using-the-compilation-api"><span>Using the Compilation API</span></li>
+</ul>
+</li>
+<li data-link="targets"><span>Supported Compilation Targets</span>
+<ul class="toc_list">
+<li data-link="targets#background-and-terminology"><span>Background and Terminology</span></li>
+<li data-link="targets#direct3d-11"><span>Direct3D 11</span></li>
+<li data-link="targets#direct3d-12"><span>Direct3D 12</span></li>
+<li data-link="targets#vulkan"><span>Vulkan</span></li>
+<li data-link="targets#opengl"><span>OpenGL</span></li>
+<li data-link="targets#cuda-and-optix"><span>CUDA and OptiX</span></li>
+<li data-link="targets#cpu-compute"><span>CPU Compute</span></li>
+<li data-link="targets#summary"><span>Summary</span></li>
</ul>
</li>
<li data-link="a1-special-topics"><span>Special Topics</span>