Skip to content

Commit 52eb4e7

Browse files
authored
Remove empty reflection doc, update links to go to ReadTheDocs (#134)
The page Using the Slang Compilation API has a dead link to https://shader-slang.com/slang/docs/reflection-api, which is dead because the page is not built. The page is not built because it is not in the index file, and it was deliberately omitted from there because it is just a stub containing TODO: write documentation on reflection API here, and update link in docs/index.md This removes the empty doc and updates the link to point at the relevant chapter of the User Guide on ReadTheDocs, and updates other links on the site to point to ReadTheDocs. The updated links are full URLs instead of internal filepaths because we still serve versions of those pages using Jekyll in addition to the RTD versions (and are therefore still accessible to anyone with an old link), and only the RTD versions would resolve those paths. In the future redirects could be used on those Jekyll pages to redirect to RTD in the future, making them the only version that needs to work.
1 parent 289580b commit 52eb4e7

File tree

6 files changed

+19
-29
lines changed

6 files changed

+19
-29
lines changed

docs/coming-from-hlsl.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ T max4(T x, T y, T z, T w)
179179
{{ somemarkdown | markdownify }}
180180
</td></tr></table>
181181

182-
For more detailed explanations on defining a custom interface, please refer to the [Slang User's Guide](https://shader-slang.com/slang/user-guide/interfaces-generics.html).
182+
For more detailed explanations on defining a custom interface, please refer to the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/06-interfaces-generics.html).
183183

184184

185185
#### `#pragma` for DXC wouldn't work for Slang
@@ -242,7 +242,7 @@ MyStruct operator+(MyStruct lhs, MyStruct rhs)
242242
{{ somemarkdown | markdownify }}
243243
</td></tr></table>
244244

245-
For more details, please consult the [Slang User's Guide](https://shader-slang.com/slang/user-guide/convenience-features.html#operator-overloading)
245+
For more details, please consult the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#operator-overloading)
246246

247247
#### Subscript Operator
248248
Slang uses a different syntax for overloading subscript operator so both reads and writes to a subscript location can be defined.
@@ -283,7 +283,7 @@ struct MyType
283283
{{ somemarkdown | markdownify }}
284284
</td></tr></table>
285285

286-
For more details, please consult the [Slang User's Guide](https://shader-slang.com/slang/user-guide/convenience-features.html#subscript-operator).
286+
For more details, please consult the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#subscript-operator).
287287

288288

289289
#### Implicit parameter binding
@@ -325,7 +325,7 @@ Due to this difference, some casting issues may appear as errors while migrating
325325

326326

327327
#### SPIR-V target specific functionalities
328-
When you target SPIR-V, there are a few things that the user may want to know. Please check the [Slang User's Guide](https://shader-slang.com/slang/user-guide/spirv-target-specific.html) for more details.
328+
When you target SPIR-V, there are a few things that the user may want to know. Please check the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/a2-01-spirv-target-specific.html) for more details.
329329

330330

331331
### Debugging and Performance Tips
@@ -337,7 +337,7 @@ When debugging Slang shaders, disabling optimizations can simplify the debugging
337337
Slang offers a command-line option to emit or suppress `#line` directives when targeting C-like text formats such as HLSL, GLSL, Metal, and WGSL.
338338
When `#line` directives are emitted, they can assist in debugging with shader debugging tools, as these tools can correlate back to the original Slang shader.
339339

340-
For more information, please refer to `LineDirectiveMode` in the [Slang User's Guide](https://shader-slang.com/slang/user-guide/compiling.html).
340+
For more information, please refer to `LineDirectiveMode` in the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/08-compiling.html).
341341

342342

343343
#### Experiment with [ForceInline]

docs/compilation-api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This tutorial explains the flow of calls needed to use the Slang Compilation API
1313

1414
Using the compilation API offers much more control over compilation compared to `slangc`, and with better performance as well. For applications with complex needs, or ones that are sensitive to compilation performance, it is recommneded to use the Compilation API.
1515

16-
The Slang compilation API is provided as a dynamic library. Linking to it, you have access to the compilation API which is organized in a Component Object Model (COM) fashion. The Slang [User Guide](https://shader-slang.com/slang/user-guide/compiling.html#using-the-compilation-api) describes Slang's "COM-lite" interface a bit more.
16+
The Slang compilation API is provided as a dynamic library. Linking to it, you have access to the compilation API which is organized in a Component Object Model (COM) fashion. The Slang [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/08-compiling.html#using-the-compilation-api) describes Slang's "COM-lite" interface a bit more.
1717

1818
## Table of Contents
1919

@@ -96,7 +96,7 @@ Slang supports using the preprocessor.
9696

9797
##### Compiler options
9898

99-
Here is where you can specify Session-wide options. Check the [User Guide](https://shader-slang.com/slang/user-guide/compiling.html#compiler-options) for info on available options.
99+
Here is where you can specify Session-wide options. Check the [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/08-compiling.html#compiler-options) for info on available options.
100100

101101
```cpp
102102
std::array<slang::CompilerOptionEntry, 1> options =
@@ -168,7 +168,7 @@ A common way to query an entry-point is by using the `IModule::findEntryPointByN
168168
```
169169

170170
It is also possible to query entry-points by index, and work backwards to check the name of the entry-points that are returned at different indices.
171-
Check the [User Guide](https://shader-slang.com/slang/user-guide/reflection.html#program-reflection) for info.
171+
Check the [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/09-reflection.html#program-reflection) for info.
172172

173173
#### Compose Modules and Entry Points
174174

@@ -291,19 +291,19 @@ Modules are loaded into the session as described in [Load Modules](#load-modules
291291

292292
Slang offers the capability to save modules to disk after this initial processing, allowing for faster initial module load times.
293293

294-
API methods for module precompilation are described in the [User Guide](https://shader-slang.com/slang/user-guide/link-time-specialization.html#using-precompiling-modules-with-the-api).
294+
API methods for module precompilation are described in the [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/10-link-time-specialization.html#using-precompiling-modules-with-the-api).
295295

296296
Specialization
297297
--------------
298298

299299
#### Link-time Constants
300300

301-
This form of specialization involves placing relevant constant definitions in a separate Module that can be selectively included. For example, if you have two variants of a shader that differ in constants that they use, you can create two different Modules for the constants, one for each variant. When composing one variant or the other, just select the right constants module in createCompositeComponentType(). This is described also in the [User Guide](https://shader-slang.com/slang/user-guide/link-time-specialization.html#link-time-constants)
301+
This form of specialization involves placing relevant constant definitions in a separate Module that can be selectively included. For example, if you have two variants of a shader that differ in constants that they use, you can create two different Modules for the constants, one for each variant. When composing one variant or the other, just select the right constants module in createCompositeComponentType(). This is described also in the [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/10-link-time-specialization.html#link-time-constants)
302302

303303
#### Link-time Types
304304

305305
Similar to Link-time Constants. This form of specialization simply puts different versions of user types in separate modules so that the needed implementation can be selected when creating the CompositeComponentType.
306-
[User Guide](https://shader-slang.com/slang/user-guide/link-time-specialization.html#link-time-types)
306+
[User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/10-link-time-specialization.html#link-time-types)
307307

308308
#### Generics Specialization
309309

@@ -679,7 +679,7 @@ An `IMetaData` interface can be queried from a compiled program. After `getEntry
679679
isUsed);
680680
```
681681
682-
See [Reflection API Tutorial](https://shader-slang.com/slang/docs/reflection-api) for more details.
682+
See [Using the Reflection API](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/09-reflection.html) for more details.
683683
684684
Complete Example
685685
----------------

docs/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ intro_image_hide_on_mobile: false
4949
<p>Slang code is highly portable, but can still leverage unique platform capabilities, including the latest
5050
features in
5151
Direct3D and Vulkan. For example, developers can make full use of <a
52-
href="https://shader-slang.com/slang/user-guide/convenience-features.html#pointers-limited">pointers</a> when generating
53-
SPIR-V. Slang's <a href="/slang/user-guide/capabilities.html">capability
52+
href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#pointers-limited">pointers</a> when generating
53+
SPIR-V. Slang's <a href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/05-capabilities.html">capability
5454
system</a> helps applications manage feature set differences across target platforms by ensuring
5555
code only uses available
5656
features during the type-checking step, before generating final code. Additionally, Slang provides <a
57-
href="https://shader-slang.com/slang/user-guide/a1-04-interop.html">flexible
57+
href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/a1-04-interop.html">flexible
5858
interop</a> features to enable directly embedding target code or SPIR-V into generated shaders.</p>
5959
</div>
6060
</div>

docs/parameter-blocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ The approach we will describe here is only appropriate for applications that abi
545545
In the absence of manual annotation, the Slang compiler will bind parameters to locations in a deterministic fashion, and an application can simply mirror that deterministic logic in its own code in order to derive the locations that parameters have been bound to.
546546

547547
Applications that need to support the fully general case (including shader code with manual binding annotations) can still make use of parameter blocks.
548-
In such cases, developers are encouraged to read the other [documentation](user-guide/reflection) that exists for the Slang reflection API.
548+
In such cases, developers are encouraged to read the other [documentation](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/09-reflection.html) that exists for the Slang reflection API.
549549

550550
This section will also restrict itself to the Vulkan API, for simplicity.
551551
We cover the creation of descriptor set layouts and pipeline layouts using reflection, but *not* the task of writing to them.

docs/reflection-api.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,16 @@ description: Empowering real-time graphics developers with advanced language fea
9595
latest
9696
features in
9797
Direct3D and Vulkan. For example, developers can make full use of
98-
<a href="/slang/user-guide/convenience-features.html#pointers-limited">pointers</a> when generating
98+
<a href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#pointers-limited>pointers</a> when generating
9999
SPIR-V.
100-
Slang's <a href="/slang/user-guide/capabilities.html">capability system</a> helps applications
100+
Slang's <a href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/05-capabilities.html">capability system</a> helps applications
101101
manage
102102
feature
103103
set differences
104104
across target platforms by ensuring code only uses available features during the type-checking step,
105105
before
106106
generating
107-
final code. Additionally, Slang provides <a href="/slang/user-guide/a1-04-interop.html">flexible
107+
final code. Additionally, Slang provides <a href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/a1-04-interop.html">flexible
108108
interop</a>
109109
features to enable
110110
directly embedding target code or SPIR-V into generated shaders.

0 commit comments

Comments
 (0)