summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2025-05-08Fix broken links in Slang docs (#7039)aidanfnv
This change fixes some broken links/anchors in the Slang docs that I found after running a link checker tool on the readthedocs site. Some of these were broken on GitHub Pages as well, such as anchors with apostrophes or docs that were moved. The doc writer change adds an explicit .html extension to Parameter links, so that Sphinx/RTD does not treat it as an anchor.
2025-05-05Remove extra User Guide readthedocs TOC entries by turning extra H1 headings ↵aidanfnv
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.
2025-05-02Add tables of contents to user guide for use on readthedocs (#6979)aidanfnv
This change adds hidden (commented out) tables of contents to the index of the User Guide, as well as each of the additional chapters, so that readthedocs will render the User Guide structure.
2025-04-30Add `IOpaqueDescriptor::descriptorAccess`. (#6967)Yong He
* Add `IOpaqueHandle::descriptorAccess`. * Update doc. * fix.
2025-04-28Add Slang Byte Code generation and interpreter. (#6896)Yong He
* Add Slang Byte Code generation and interpreter. * Fix compile issues. * format code * More compile fix. * Fix clang issue. * Fix more clang issues. * Another clang fix. * Fix clang issues. * Fix another clang issue. * Fix wasm build. * Update building.md * Fix test-server. * Fix compile error. * Fix bug. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2025-04-22Implement shader subgroup rotate intrinsics (#6878)Darren Wihandi
* Initial implementation for SPIRV, GLSL and Metal * test add bool test * Fix and improve subgroup rotate tests * Add proper GLSL extensions and proper Metal type checking * Clean up tests and add diagnostics test for subgroup type for Metal * Update wave-intrinsics docs
2025-04-22Add a new SM profile 6.9 (#6879)Jay Kwak
2025-04-19Implement 64bit countbits intrinsic (#6433) (#6845)sricker-nvidia
Change modifies the countbits intrinsic to use generics in order to support 64bit countbits on select platforms where this is supported. On platforms where this is not natively supported, we emulate by converting the 64-bit type into a uint2 (metal and spir-v). This should align with the implementation of other uint64_t intrinsics such as abs, min, max and clamp. Added new countbits64 test to verify changes. Updated documentation for 64bit-type-support.html
2025-04-19Document matrix multiplication operators (#6852)Jay Kwak
* Document matrix multiplication operators This is to address one of cases where a user was confused about why Slang doesn't have operator overloading of multiplication for matrices. It is little confusing that glsl.meta.slang implemented `operator*()` for matrices but Slang/HLSL doesn't. It turned out that HLSL/Slang performs a component-wise multiplication with `operator*()` whereas GLSL performs a matrix multiplication. * Mentioning CUDA * Update based on the review feedback
2025-04-16Remove support for ad hoc Slang IR compression (#6834)Theresa Foley
* Remove support for ad hoc Slang IR compression This change is part of a larger effort to clean up the approach to serialization in the Slang compiler. The overall goal is to simplify and streamline all of the serialization-related logic, so that we are left with code that is less "clever," and easier to understand for contributors to the codebase. Removing support for compression of serialized Slang IR has benefits that include: * Reduction in code complexity: consider things like the subtle way that the `FOURCC`s for compressed chunks were being computed from the uncompressed versions, and the mental overhead that goes into understanding that, for anybody who would dare to touch this code. * Reduction in testing burden: there have been, de facto, two very different code paths for serialization of the Slang IR, and it is not clear that the existing test corpus for Slang has sufficient coverage for both options. By having only a single code path, every test that performs any amount of IR serialization helps with test coverage of that one path. * Opportunity to explore alternatives. This is perhaps a reiteration of the first point, but once the code is stripped down to the simplest thing that could possibly work (I am not claiming it has reached that point yet), it becomes easier for contributors to understand, and it becomes more tractable for somebody to come along with an improved approach that performs better (in either compression ratio or performance) while still being maintainable. In my own local setup, I found that removing support for Slang IR compression led to the `slang-core-module-generated.h` file increasing in size from 46.1MB to 47.4MB. This increase in the `.h` file size for the core library binary only resulted in a release build of `slang.dll` increasing from 20.0MB to 20.2MB. Removing the ad hoc compression support has almost no impact on the size of actual binary Slang modules *so long* as the additional LZ4 compression step is being applied to them. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2025-04-15Add cooperative matrix 1 support (#6565)Darren Wihandi
* initial wip for spirv * working tiled example * clean up store and load * minor fixes * fix loadAny name * add initial tests, including broken/unimplemented intrinsics * fix subscript * run tests at 16x16, remove not supported arithmetic tests * minor fixups on implementation * rename CoopMatMatrixUse * Update tests to pass validation layers locally * Add mat-mul-add test and minor fixes * Add more tests * Remove dead code * Add coopMatLoad function and tests, enforce constexpr for matrix layout * Use getVectorOrCoopMatrixElementType in place of getVectorElementType
2025-04-14Add SV_PointCoord to match gl_PointCoord (#6795)Julius Ikkala
* Add gl_PointCoord support in GLSL compat mode * Add SV_PointCoord * Test on metal as well * Update SPIRV system value semantics table in docs * Update metal docs for SV_PointCoord
2025-04-11Fix user-guide typos (#6789)Gangzheng Tong
* 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
2025-04-06Add defer statement (#6619)Julius Ikkala
2025-04-01Update hyperlinks in User Guide's Reference section (#6715)Sruthik P
Fixes #6692 This change fixes the hyperlinks used in the User Guide's Reference section as the previously used paths were leading to a 404
2025-03-31[docs] Admonish slangc entry points / shader attributes (#6033)Ben-Fields
* [docs] Admonish slangc entry points / shader attributes Admonish the related non-functional compilation command in the reference manual until #5541 is addressed. * Refine shader attribute description. * Refine shader attribute description * Update with all supported targets Add all targets supporting shader attributes per provided verbiage. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2025-03-20Add Nix flake for direnv (#6635)Sam Estep
* Add Nix flake for direnv * Use Sai's suggestion for the `description` * Make `.envrc` optional * Move Nix docs to their own section * Tweak wording * Tweak wording more * Add `nixfmt` --------- Co-authored-by: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2025-03-19Output SPV_KHR_compute_shader_derivatives extension string instead of the NV ↵Darren Wihandi
extension (#6641) * Output SPV_KHR_compute_shader_derivatives instead of the NV extension * add alias for nv extension
2025-03-18Implement floating-point pack/unpack intrinsics for all targets (#6503)Darren Wihandi
* Implement floating-point pack/unpack intrinsics * remove unused functions and update caps in glsl meta file * rename pack capability
2025-03-05Add module organization suggestion doc (#6509)cheneym2
* Add module organization suggestion doc Suggest one method to keep slang modules organized in the file system. Closes #4841
2025-02-27Fix template for deprecated docs. (#6496)Yong He
2025-02-27Fix doc. (#6495)Yong He
2025-02-27Fix doc. (#6494)Yong He
2025-02-27Fix doc build. (#6493)Yong He
2025-02-27Document bug with global session teardown in user guide (#6479)Anders Leino
This closes #6344. Co-authored-by: Yong He <yonghe@outlook.com>
2025-02-26Improve entry point lookup function documentation (#6451)Anders Leino
* Document that findEntryPointByName is not applicable if there is no [shader(...)] attribute * Update the user guide to mention findAndCheckEntryPoint for entry points without [shader(...)] attributes * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-02-23Improve performance when compiling small shaders. (#6396)Yong He
Improve performance when compiling small shaders. Avoid copying witness table entries that are not getting used during linking. Avoid copying auto-diff related decorations and derivative functions during linking, if the user modules doesn't use autodiff. Cache operator overload resolution results on global session, so each new Session doesn't need to repetitively run through overload resolution from scratch.
2025-02-18Fix and document static build (#6374)Ellie Hermaszewska
* Set static stbi flag for static builds * Add missing SYSTEM directive for external includes * Add instructions for linking statically against slang --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-02-10Remove the docs/proposals directory (#6313)Anders Leino
* Remove the docs/proposals directory This directory will get added to the spec repository in the following PR: https://github.com/shader-slang/spec/pull/6 This closes #6155. * Remove entry from .github/CODEOWNERS file * Redirect some proposal references --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-02-06Mark slangpy as deprecated and remove from user-guide. (#6300)Yong He
2025-02-06Update a3-reference.md (#6309)KoT
Co-authored-by: Yong He <yonghe@outlook.com>
2025-02-06Support stage_switch. (#6311)Yong He
* Support stage_switch. * Update proposal status. * Fix gl_InstanceID. * Fix.
2025-02-05Allow tuples to work with initializer list. (#6301)Yong He
* Allow tuples to work with initiailizer list. * Update definition of C-Style types.
2025-02-05Add floating-point pack/unpack proposal (#6191)Darren Wihandi
* add initial proposal * update proposal * update proposal * update proposal * update proposal * fix typo * improve wording --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-02-05Fix inline markdown rendering (#6294)Sai Praveen Bangaru
* Fix inline markdown rendering * Fix it in a different way.. * Update 07-autodiff.md --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-02-05Use two-stage parsing to disambiguate generic app and comparison. (#6281)Yong He
* Use two-stage parsing to disambiguate generic app and comparison. * Typo fix. * Update doc.
2025-02-05Feature/initialize list side branch (#6058)kaizhangNV
* SP004: implement initialize list translation to ctor - We synthesize a member-wise constructor for each struct follow the rules described in SP004. - Add logic to translate the initialize list to constructor invoke - Add cuda-host decoration for the synthesized constructor - Remove the default constructor when we have a valid member init constructor - Disable -zero-initialize option, will re-implement it in followup (#6109). - Fix the overload lookup issue When creating invoke expression for ctor, we need to call ResolveInvoke() to find us the best candidates, however the existing lookup logic could find us the base constructor for child struct, we should eliminate this case by providing the LookupOptions::IgnoreInheritance to lookup, this requires us to create a subcontext on SemanticsVisitor to indicate that we only want to use this option on looking the constructor. - Do not implicit initialize a struct that doesn't have explicit default constructor. Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2025-02-02Add support for WGSL subgroup operations (#6213)Darren Wihandi
* initial work * more work * more work on glsl intrinsics * add subgroup broadcast for glsl * wip add wgsl extension tracking * enable tests, enable extensions and added some todos * format and warning fixes * fix wgsl extension tracker --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-30[Docs] Auto-diff documentation overhaul (#6202)Sai Praveen Bangaru
* 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>
2025-01-30Support cooperative vector (#6223)Jay Kwak
* Support cooperative vector without Vulkan-header update Adding a Slang support for cooperative vector. But this commit doesn't have Vulkan-header update.
2025-01-29Fix combined sampler documentation and warning (#6207)cheneym2
* Fix combined sampler documentation and warning * Update comment, show detailed '-fvk-t-shift' message in warning instead of generic '-fvk-xxx-shift' * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2025-01-29Implement WaveMultiPrefix* for SPIRV and GLSL (#6182)Darren Wihandi
2025-01-28Proposal for Cooperative Vector in Slang (#6209)Jay Kwak
2025-01-28Add slangpy proposal (#6156)Yong He
* Add slangpy proposal * Fix.
2025-01-24Fix static build and install (#6158)Dario Mylonopoulos
* Add SLANG_ENABLE_RELEASE_LTO cmake option * Fix cmake static build * Disable install SlangTargets to avoid static build failing
2025-01-22Cache and reuse glsl module. (#6152)Yong He
* Cache and reuse glsl module. * Fix. * Implement record/replay for the new api. * Fix record replay. * Fix test.
2025-01-17Implement Quad Control intrinsics (#5981)Darren Wihandi
2025-01-17Delete CNAMEKhronos Group Web Services
2025-01-17Create CNAMEKhronos Group Web Services
2025-01-14Fix inaccurate documentation in member function mutability. (#6065)Entropy Lost
* Fix inaccurate documentation in member function mutability. * Change throw to result in for specificity. --------- Co-authored-by: Yong He <yonghe@outlook.com>