summaryrefslogtreecommitdiffstats
path: root/docs/user-guide/toc.html
Commit message (Collapse)AuthorAge
* Minor Documentation Update to Remove Outdated Section (#8606)Xiang Hong2025-10-07
| | | | | | | | | | | | | | | | | As mentioned in #8316 , there is a small duplicated and outdated section in WGSL-Specific Functionalities documentation about specialization constants support, remove the outdated duplicated one <img width="893" height="146" alt="image" src="https://github.com/user-attachments/assets/abcd7521-645b-4bd6-b926-ce2d978775bd" /> as there is a new section in the page <img width="851" height="319" alt="image" src="https://github.com/user-attachments/assets/f52e5230-812b-4b29-88f4-bfff890f37ed" /> --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Use symbol alias instead of wrapper synthesis to implement link-time types. ↵Yong He2025-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | (#8603) This change achieves link-time type resolution with a different mechanism. For `extern struct Foo : IFoo = FooImpl;`, instead of synthesizing a wrapper type `Foo` that has a `FooImpl inner` field and dispatches all interface method calls to `inner.method()`, this PR completely removes this synthesis step, and instead just lower such `extern`/`export` types as `IRSymbolAlias` instructions that is just a reference to the type being wrapped. Then we extend the linker logic to clone the referenced symbol instead of the SymbolAlias insts itself during linking. By doing so, we greatly simply the logic need to support link-time types, and achieves higher robustness by not having to deal with many AST synthesis scenarios. Closes #8554. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Error if super-type capabilities are a super-set of sub-type (#7452)ArielG-NV2025-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #7410 Changes: 1. super-type capabilities must be a super-set of sub-type capabilities (and support the same shader stages/targets) * InheritanceDecl visits super-type to inherit it's capabilities; validate InheritanceDecl capabilities against sub-type * visit all container decl's with a default case * clean up functionDeclBase visitor * Simplify `diagnoseUndeclaredCapability` by moving logic into capability checking (more correct*) 3. added changed behavior to documentation 4. fixed some incorrect capabilities 5. **we do not** diagnose capability errors on interface requirement-to-implementation if both lack explicit capability requirements. This change is to work around a slangpy regression (test case for the failing situation is in `tests\language-feature\capability\capability-interface-extension-1.slang`), Note: maybe for slang-2026 we don't do this? 6. requirement & implementation must support the same shader stage/target. This was changed because otherwise we can have cases where `X` inherits from `Y`, but `Y` is only expected to be used in `glsl` whilst `X` is expected to be used in `hlsl | glsl` 7. removed `tests/language-feature/capability/capabilitySimplification3.slang` because it tests nothing special (redundant) Note: not using rebase due to separate branches depending on this PR --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Fix IR layout of 3-element vectors in cbuffers for -fvk-use-dx-layout (#7282)James Helferty (NVIDIA)2025-06-10
| | | | | | | | | | | | | | | | | | | * Better handling for 16-byte boundary of d3d cbuffer Fixes #6921 D3D cbuffers have slightly different packing rules that allow packing vectors into a 16-byte slot at element alignments, except when a field would cross a 16-byte boundary. In that case, we need to realign the field to the next 16-byte boundary. In particular, this impacts vec3s, which are not a power of two in size and thus require slightly different alignment logic, compared to std430 and std140. (Example: a float and float3 should fit together in that order in a single slot.) Adds test cases. Adds documentation page for GLSL target
* Add legalization for 0-sized arrays. (#7327)Yong He2025-06-04
| | | | | | | | | | | | | | | * Add legalization for 0-sized arrays. * Allow 0-sized arrays in the front-end. * More tests. * Add `Conditional<T, hasValue>` type to core module. * Update toc. * Fix wording. * Update test.
* Language version + tuple syntax. (#7230)Yong He2025-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Language version + tuple syntax. * Fix compile error. * regenerate documentation Table of Contents * Fix. * regenerate command line reference * Fix. * Fix. * Fix more test failures. * revert empty line change, * Retrigger CI * #version->#lang * Update source/core/slang-type-text-util.cpp Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> * Remove comments. * Fix parsing logic. * Fix parser. * Fix parser. * update test comment * Update options. * regenerate documentation Table of Contents * regenerate command line reference --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
* Implement throw & catch statements (#6916)Julius Ikkala2025-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement throw statement It already existed in the IR, so only parsing, checking and lowering was missing. * Initial catch implementation Likely very broken. * Error out when catch() isn't last in scope * Prevent accessing variables from scope preceding catch As those may actually not be available at that point. * Add IError and use it in Result type lowering * Add diagnostic tests * Allow caught throws in non-throw functions * Fix catch propagating between functions & SPIR-V merge issue * Add test for non-trivial error types * Fix MSVC build * Fix invalid value type from Result lowering * Also lower error handling in templates * Lower result types only after specialization * Attempt to disambiguate error enums by witness table * Revert matching by witness, types should be distinct too * Don't assert valueField when getting Result's error value It may not exist if the function returns void, but getting the error value is still legitimate. * Update tests for new error numbers & get rid of expected.txt * Change catch lowering to resemble breaking a loop ... To make SPIR-V happy. * Fix dead catch blocks and invalid cached dominator tree * More SPIR-V adjustment * Lower catch as two nested loops * Add defer interaction test and revert broken defer changes * Fix enum type when throwing literals * Cleanup and bikeshedding * Document error handling mechanism * Fix table of contents * Use boolean tag in Result<T, E> * Use anyValue storage for Result<T,E> * Remove IError * Fix formatting * Eradicate success values from docs and tests * Use parseModernParamDecl for catch parameter * Implement do-catch syntax * Implement catch-all * Fix formatting * Fix marshalling native calls that throw --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Map `SV_VertexID` to `gl_VertexIndex-gl_BaseVertex`, add `SV_Vulkan*ID` ↵Darren Wihandi2025-05-19
| | | | | | | | | | | | | | | | | semantics (#7150) * Map SV_VertexID to `gl_VertexIndex - gl_BaseVertex`, provide SV_Vulkan* SV semantics * Fix docs * Regenerate toc * Fix affected pointer-2 test * Add tests --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Support Vulkan memory model (#7057)Jay Kwak2025-05-16
| | | | | | | | | | | | | | | The user can explicitly use Vulkan memory model, or it will be automatically used when cooperative-matrix is used. When vulkan memory model is used, two keywords, "Coherent" and "Volatile", are not allowed. There are many differences regarding atomic and texture but this PR has changes limited to support `globallycoherent` keyword. When variables with `globallycoherent` is used with `OpLoad`, it will use additional options, `MakePointerAvailable|NonPrivatePointer`, that will provide the same effect. For `OpStore`, it will use `MakePointerVisible|NonPrivatePointer`.
* Add explanation for SV_InstanceID usage difference from SPIR-V (#7072)aidanfnv2025-05-14
| | | | | | | | | | Closes https://github.com/shader-slang/slang/issues/6805 This change adds a note to the SPIR-V target specific doc that SV_InstanceID does not map directly to SPIR-V's BuiltIn InstanceIndex, and adds a more detailed explanation of the difference, its motivation, and how to derive the actual value equivalent to BuiltIn InstanceIndex with an example. --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Remove extra User Guide readthedocs TOC entries by turning extra H1 headings ↵aidanfnv2025-05-05
| | | | | | | into H2 (#6986) readthedocs treats H1 headings as document titles in the sidebar table of contents. This change turns all extra H1 headings into H2 in the "Metal-Specific Functionalities" doc. These extra H1 headings seem to be errors, given that they are inconsistent, and the H2s after them do not belong. For examples, the heading "Resource Types" is H2, but "Array Types" is H1, and "Mesh Shader Support" is H1, but the following "Header Inclusions and Namespace" is not a subtopic of the Mesh Shader Support.
* Fix user-guide typos (#6789)Gangzheng Tong2025-04-11
| | | | | | | | | | * Fix user-guide typos Use LLM to scan each of the markdown files to fix typos. Try not to change anything but the typos in this CL. * typo not caught by LLM * add output of ./build_toc.ps1
* Add module organization suggestion doc (#6509)cheneym22025-03-05
| | | | | | | * Add module organization suggestion doc Suggest one method to keep slang modules organized in the file system. Closes #4841
* Mark slangpy as deprecated and remove from user-guide. (#6300)Yong He2025-02-06
|
* [Docs] Auto-diff documentation overhaul (#6202)Sai Praveen Bangaru2025-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * AD: Docs Update * More documentation * More documentation * More docs fixes * Cleanup documentation * More docs polish. Add docs for the [Differentiable] attributes * Fixup code sections * Fixup * Address review comments * regenerate documentation Table of Contents * Update docs with more playground links --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
* Initial implementation of SP#015 `DescriptorHandle<T>`. (#6028)Yong He2025-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial implementation of `ResourcePtr<T>`. * Update docs * Fix build error. * Add more discussion. * Update documentation. * Update TOC. * Fix. * Fix. * Add test case for custom `getResourceFromBindlessHandle`. * Add namehint to generated descriptor heap param. * Fix. * Fix. * format code * Rename to `DescriptorHandle`, and add `T.Handle` alias. * Fix compiler error. * Fix. * Fix build. * Renames. * Fix documentation. * Documentation fix. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Update reflection API chapter in User Guide (#5868)Theresa Foley2024-12-13
| | | | | | | | | | | * Update reflection API chapter in User guide The new version of the chapter is intended to accompany the `reflection-api` example program, and reflects (pun intended) the best practices that the Slang project team wants to encourage for interacting with the reflection API. * Rebuild TOCs
* Support specialization constant on WGSL and Metal. (#5780)Yong He2024-12-06
|
* Implement explciit binding for metal and wgsl. (#5778)Yong He2024-12-06
| | | | | | | | | | | | | | | * Respect explicit bindings in wgsl emit. * Implement explciit binding generation for metal and wgsl. * Update toc. * Fix warnings in tests. * Fix tests. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
* [Docs] Fix dead links when subsection title have underscore (#5662)Ica2024-12-02
| | | | | | | | | | | | | | * [Docs] Fix dead links when subsection title have underscore a minor change on build toc script: add underscore to link instead of replacing with "-" then I re-run the script also I tested on local server * Update toc.html --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com> Co-authored-by: Yong He <yonghe@outlook.com>
* Add WebGPU target doc (#5708)Anders Leino2024-12-02
| | | | | | | * Add WebGPU target doc This closes #5698. * Update ToC
* docs: Reduce typo count (#5671)Bruce Mitchener2024-11-29
| | | Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
* [Docs] Re-run build_toc and fix dead links (#5647)Ica2024-11-25
| | | | | | | | | * re-run build_toc.ps1 * fix dead link of readme --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
* [Docs] fix spirv dead links on toc.html (#5638)Ica2024-11-22
| | | | | I believe this will fix the dead links that occurred because of sub section renames. Co-authored-by: Yong He <yonghe@outlook.com>
* Add link to metal docs and regen TOC (#5616)Ellie Hermaszewska2024-11-20
| | | | | | | | | * Add link to metal docs * Regenerate TOC --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Various documentation improvements. (#5017)Yong He2024-09-05
|
* Support `where` clause and type equality constraint. (#4986)Yong He2024-09-05
| | | | | | | | | | | | | | | | | * Support `where` clause. * Fix. * Fix parser. * Enhance test to cover traditional __generic syntax. * Update user-guide. * Support `where` clause on associatedtype. * Fix. * Put in more comments.
* Document All Capability Atoms and Profiles (#5008)ArielG-NV2024-09-05
| | | | | | | | | | | | | | | | * Document All Capability Atoms and Profiles Fixes: #4125 Unimplemented Considerations: 1. This PR does not add support to query all capability-atom's from a command-line option. It is understood that this might be desired, due to this, the logic to generate `docs\user-guide\a3-02-reference-capability-atoms.md` was made to be "command-line friendly" so minimal changes are needed to pipe our documentation into a command-line option if this change is to be added. Changes: 1. Added a way to document atoms inside `.capdef`. Method to document is described under `source\slang\slang-capabilities.capdef`. The goal is to error if a public atom does not have any form of documentation to ensure we always have up-to-date documentation to guide user on what an atom is/does. * The following `.capdef` file syntax was added * /// [HEADER_GROUP] * /// regular comment 2. When capability generator runs it auto-generates `docs\user-guide\a3-02-reference-capability-atoms.md` 3. Added to the user-guide 3 sections: `Reference`, `Reference -> Capability Profiles`, `Reference -> Capability atoms` section
* Add Documentation For Auto-Generated Constructors & Initializer Lists (#4988)ArielG-NV2024-09-04
| | | | | | | | | | | | | * Add documentation for auto-generated constructors & Initializer Lists fixes: #4903 Add documentation for auto-generated constructors & Initializer Lists, the logic behind this PR is on #4854 * clean up documentation as per review comments --------- Co-authored-by: Yong He <yonghe@outlook.com>
* User guide page for SPIR-V target specific information (#4815)Jay Kwak2024-08-30
| | | Adding a user guide page for SPIR-V specific features.
* Tuple swizzling, concat, comparison and `countof`. (#4856)Yong He2024-08-19
| | | | | | | | | | | * Tuple swizzling and element access. * Update proposal status. * Cleanup. * Fix merrge error. * Address review.
* Add Metal to user-guide/09-targets.md (#4703)Jay Kwak2024-07-23
| | | | | | | * Add Metal to user-guide/09-targets.md Partially resolves #4262 The description of "Parameter passing" part for Metal is related to PR #4022
* Move if_let syntax to convenience-features section (#4628)kaizhangNV2024-07-15
| | | | | | | | | | | * Move if_let syntax to convenience-features section * Fix the syntax for setting up an anchor * update the comment on sample code * Add example for if_let syntax * Address the comments
* Add reflection API for functions. (#4587)Yong He2024-07-10
| | | | | | | | | | | * Add reflection API for functions. This change adds `SlangFunctionReflection` type in the reflection API that provides methods for querying function result type, parameters and user-defined attributes. `ProgramLayout::findFunctionByName` can now find a function with the given name and returns a `FunctionReflection`. `IEntryPoint` now has a `getFunctionReflection` method that returns an `FunctionReflection` for the entrypoint. * More modifiers; make reflection API consistent.
* Add user guide section on user-defined attributes. (#4557)Yong He2024-07-10
| | | | | * Add user guide section on user-defined attributes. * Update toc
* Fix pointers link in userguide (#4217)cheneym22024-05-23
| | | | | Adding (limited) to the header in a previous doc change broke the link. Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
* Update user guilde for new features. (#3875)Yong He2024-04-02
|
* Remove out of date documentation on compilation API. (#3785)Yong He2024-03-17
| | | | | * Remove out of date documentation on compilation API. * Update toc.
* Add documentation for uniformity analysis. (#3721)Yong He2024-03-08
|
* Add user-guide section on pointers. (#3670)Yong He2024-03-04
|
* Update doc TOC (#3657)Yong He2024-03-01
|
* Update documentation TOC. (#3641)Yong He2024-02-27
|
* Update doc links. (#3640)Yong He2024-02-27
|
* Add documentation for link-time specialization. (#3638)Yong He2024-02-27
|
* Add documentation on capability system. (#3549)Yong He2024-02-05
| | | Fixes #3454.
* Add doc for special scoping syntax. (#3416)Yong He2023-12-15
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Diagnose for invalid decl nesting + namespace lookup fixes. (#3397)Yong He2023-12-11
| | | | | | | | | | | | | | | | | | | | | | | * Diagnose for invalid decl nesting. * Fix. * Fix. * Fix. * Fix `namespace` lookup and `using` resolution. * fix project files. * revert project files. * Enhance namespace syntax, docs. * Fixes. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Change default visibility of interface members and update docs. (#3381)Yong He2023-12-06
| | | | | | | | | * Update behavior around interfaces and docs. * Update toc --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Support visibility control and default to `internal`. (#3380)Yong He2023-12-06
| | | | | | | | | | | | | | | | | | | * Support visibility control and default to `internal`. * Fix wip. * Fixes. * Fix. * Fix test. * Add legacy language detection and compatibility for existing code. * Add doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Add documentation on target intrinsics. (#3276)Yong He2023-10-13
| | | Co-authored-by: Yong He <yhe@nvidia.com>