summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Collapse)Author
2024-10-23Document bit operations (#5373)cheneym2
* Document bit operations Fixes #5307 * Update hlsl.meta.slang
2024-10-22Document derivative core module functions (#5369)cheneym2
2024-10-21Recognize a new spirv header json grammar keyword "aliases" (#5367)Jay Kwak
* Recognize a JSON keyword "aliases" for SPIRV-header This commit will handle the new JSON keyword "aliases" in SPIRV-Header grammar files. "aliases" are used in two places: one for "opname" and another for "enumerants". This commit itself wouldn't do anything until we integrate new commits from SPIRV-Header repo.
2024-10-21Fix spirv codegen for pointer to empty structs. (#5355)Yong He
2024-10-21Stdlib documentation for Atomic, Optional, Tuple (#5358)Ellie Hermaszewska
2024-10-21Add more doc for builtin interfaces. (#5357)Yong He
2024-10-20Mark SPIRV artifact as non-executable. (#5356)Yong He
2024-10-20Properly check switch case. (#5341)Yong He
2024-10-19Remove use of Variable Pointer capability. (#5352)Yong He
* Remove use of Variable Pointer capability.
2024-10-18Use `VariablePointersStorageBuffer` instead of `VariablePointer` spv … (#5340)Yong He
2024-10-17Cleanup definition of `printf`. (#5330)Yong He
* Cleanup definition of `printf`. * Fix. * Fix spirv generation. * Fix. * enhance test.
2024-10-17Cleanup atomic intrinsics. (#5324)Yong He
* Cleanup atomic intrinsics. * Fix. * Fix glsl. * Remove hacky intrinsic expansion logic for glsl image atomics. * Fix all tests. * Fix. * Add `InterlockedAddF16Emulated`. * Fix glsl intrinsic. * Fix.
2024-10-17Add 'findAndCheckEntryPoint' to wasm binding (#5337)kaizhangNV
2024-10-17Fix D3D12Core.dll loading problem (#5315)Jay Kwak
D3D12Core.dll had been copied to a wrong directory and slang has been using D3D12Core.dll from the system directory, C:\windows\system32. D3D12Core.dll has to be copied from external/slang-binaries/bin/windows-x64 to build/Release/bin/D3D12 not to build/Release/bin. The same is true for the debug build and it had to be copied to build/Debug/bin/D3D12 not build/Debug/bin. It hasn't been a problem for Release build, because the debug-layer is not enabled for Release build and it didn't cause the version mismatching problem with D3D12SDKLayers.dll. The Release build was loaded from either build/Release/bin or from C:\windows\system32, and it didn't matter which one was used. The Debug build, however, got into a problem where D3D12Core.dll was loaded from the system directory whereas D3D12SDKLayers.dll was loaded from build/Debug/bin and it failed to load D3D12.dll entirely. This caused D3D12 to be "Not supported" for "Windows/Debug" configuration. Note that our CI explicitly excludes DX12 tests for the "Windows/Debug" configuration with a command-line argument "-api all-dx12", and DX12 tests were going to be ignored anyway. The actual problem was observed when WGPU is implemented. WGPU started printing explicit errors for the load failure of D3D12.dll. See more detailed explanation: https://devblogs.microsoft.com/directx/gettingstarted-dx12agility/#d3d12sdkpath-should-not-be-the-same-directory-as-the-application-exe Closes #5305 Closes #5276
2024-10-16Fix entrypoint naming in glsl backend. (#5320)Yong He
2024-10-16Fix spirv debug info for pointer types. (#5319)Yong He
* Fix spirv debug info for pointer types. * fix comment.
2024-10-15Fix type checking on generic extensions. (#5316)Yong He
Add fcpw library to test suite.
2024-10-15Add stdlib documentation for attributes and interfaces. (#5297)Yong He
* Add stdlib documentation for attributes and interfaces. * Fix name mangling to avoid collision of functions in different extensions. * Fix doc.
2024-10-15 Move C interface from slang.h to slang-deprecated.h (#5301)Ellie Hermaszewska
* Squash redundant move warnings * Move C interface from slang.h to slang-deprecated.h spGetBuildTagString remains, because it's useful to have before the global session exists. This C API is used quite pervasively in the C++ helpers (for example slang::UserAttribute. It's not trivial to move these to slang-deprecated.h as they're entangled with some enums which are themselves used elsewhere in the compiler. The fact that these helpers use the C API can be viewed as an implementation detail for now, and this usage moved to slang-deprecated in due course. Closes https://github.com/shader-slang/slang/issues/4758 * Squash warnings for our usage of our deprecated API --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-10-15Enable WebGPU tests in CI (#5239)Anders Leino
2024-10-14Fix unexported spReflectionEntryPoint_GetFunction (#5260)cupofc0t
Co-authored-by: Yong He <yonghe@outlook.com>
2024-10-14Misc build fixes. (#5271)Yong He
* Don't use __assume for SLANG_ASSERT + build fixes. * Fix. * build slang-wasm conditionally * Fix. * revert retry open file * revert include. * another attempt of silencing compiler warnings. * revert assume change.
2024-10-14Fix release build failure (#5285)Ellie Hermaszewska
* Fix race condition for building stdlib headers Fixes https://github.com/shader-slang/slang/issues/5270 * Generalize slangtarget install options * Install slang-without-embedded-stdlib with generators --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-10-14Fix assert when compiling an entrypoint that calls another entrypoint. (#5268)Yong He
* Fix assert when compiling an entrypoint that calls another entrypoint. * Fix test.
2024-10-14Write out summary of documentation in docgen tool. (#5266)Yong He
2024-10-13Fix race condition for building stdlib headers (#5272)Ellie Hermaszewska
Fixes https://github.com/shader-slang/slang/issues/5270
2024-10-11Restrict stdlib embed macros to single source file (#5251)Ellie Hermaszewska
* Restrict stdlib embed macros to single source file * Build slang-without-embedded-stdlib with the same target type as libslang To avoid building everything twice
2024-10-11Add slang-wasm target (#5237)Anders Leino
Support for exceptions is enabled, since Slang uses them for diagnostics. The size optimization arguments ('-Os') resolves some internal emscripten error during the slang-wasm.wasm linking step, which happens when enabling exceptions. ("parse exception: too many locals")
2024-10-11WGSL: Enable load & store from byte-addressible buffers (#5252)Anders Leino
2024-10-10Fix links in stdlib reference category landing page. (#5250)Yong He
2024-10-09Support constant folding for static array access. (#5248)Yong He
* Support constant folding for static array access. * Fix test.
2024-10-09Use user defined type name in glsl buffer declarations. (#5242)Yong He
2024-10-09Fix precompiled glsl modules (#5230)cheneym2
When precompiling modules defined with glsl, it's necessary to link in the glsl definition module. Reuse the public fillRequirements declaration
2024-10-09Metal: Texture write fix (#4952)Dynamitos
2024-10-09Fix spirv lowering logic around pointer to unsized array. (#5243)Yong He
* Fix spirv lowering logic around pointer to unsized array. * Fix. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-10-09Fix bug related to findAndCheckEntrypoint. (#5241)Yong He
2024-10-08Fix build for clang-14 (#5235)James0124
Co-authored-by: Yong He <yonghe@outlook.com>
2024-10-08Overhaul docgen tool and setup CI to generate stdlib reference. (#5232)Yong He
* Overhaul docgen tool and setup CI to generate stdlib reference. * Fix build error. * Write parsed doc for all decls. * fix. * fix callout. * Fix. * Fix comment. * Fix. * Delete obsolete doc tests. * Fix. * Categorize functions and types. * Fix CI. * Update comments.
2024-10-08Look through attributes and rates when determining by reference ↵Ellie Hermaszewska
initialization (#5023) * Look through attributes and rates when determining by reference initialization Closes #5022 * Make type of unwrapAttributedType more specific * loosen type of unwrapAttributedType * Discard changes to source/slang/slang-emit-spirv.cpp * Discard changes to source/slang/slang-ir-check-differentiability.cpp * Discard changes to source/slang/slang-ir.cpp * Discard changes to source/slang/slang-ir.h * Update slang-ir-use-uninitialized-values.cpp * Remove redundant cast --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-10-08WGSL emitter: Specify private address space for global non-handle variable ↵Anders Leino
declarations (#5236) Closes issue #5229.
2024-10-07Add WGSL support for slang-test (#5174)Anders Leino
* Use the assembly description as target when disassembling I believe this is a bugfix. It seems to have worked before because up until the WGSL case, the disassembler has been the same executable as the one producing the binary to be disassembled. * Add Tint as a downstream compiler This closes issue #5104. * Add downstream compiler for Tint. * Tint is wrapped in a shared library, 'slang-tint' available from [1]. * The header file for slang-tint.dll is added in external/slang-tint-headers. * Add some boilerplate for WGSL targets. * Add an entry point test for WGSL. [1] https://github.com/shader-slang/dawn/releases/tag/slang-tint-0 * Add WGSL_SPIRV as supported target for Glslang * Add WebGPU support to slang-test This helps to address issue #5051. * Disable lots of crashing compute tests for 'wgpu' This closes issue #5051. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-10-06Refactor the code for synthesizing the body of constructor (#5231)kaizhangNV
2024-10-04Add interfaces for retrieving separate linkable downstream binaries (#5128)cheneym2
* Implement separate downstream library interface Create a new com interface to house the methods for precompiling slang modules to target code. Add methods to count dependent modules and scrape them for downstream target binaries such that the downstream target binaries are linkabe outside of slang, e.g. via spirv-link or dxc. Fixes #5147 * Rename to _Experimental Clearly identify this as an interface subject to change.
2024-10-04Allow building using external dependencies (#5076)Tobias Frisch
* Add options to prevent usage of own submodules Signed-off-by: Jacki <jacki@thejackimonster.de> * Allow using external unordered dense headers Signed-off-by: Jacki <jacki@thejackimonster.de> * Link system wide installed unordered dense Signed-off-by: Jacki <jacki@thejackimonster.de> * Allow external header usage for lz4 and spirv Signed-off-by: Jacki <jacki@thejackimonster.de> * Add more options to disable targets Signed-off-by: Jacki <jacki@thejackimonster.de> * Add option to provide explizit path for spirv headers and remove earlier options that break the build process Signed-off-by: Jacki <jacki@thejackimonster.de> * Rename options to use common prefix Signed-off-by: Jacki <jacki@thejackimonster.de> * Fix indentation for the cmake changes Signed-off-by: Jacki <jacki@thejackimonster.de> * Add advanced_option function for cmake * Normalize includes between system and submodule dependencies Fix any before-accidentally-working problems * Add option for enabling/disabling slang-rhi Signed-off-by: Jacki <jacki@thejackimonster.de> * Pass correct include path for cpu tests * Correct include path --------- Signed-off-by: Jacki <jacki@thejackimonster.de> Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-10-03Support custom derivatives of member functions of differentiable types (#5124)Sai Praveen Bangaru
* Initial work to support custom derivatives for member methods of differentiable types * Support custom derivatives of member functions of differentiable types - Also adds support for declaring custom derivatives via extensions. * Fix * move defs * Update slang-check-decl.cpp * Create diff-member-func-custom-derivative.slang.expected.txt * Update slang-check-decl.cpp * Fix for static custom derivatives * Fix diagnostics for [PreferRecompute] * Add backward custom derivative tests
2024-10-02Fix the broken CI (#5216)Jay Kwak
The type of `sizeof` has to be int not uint.
2024-10-01Fix crash when compiling associatedtypes with generic interface constraints. ↵Yong He
(#5200) * Fix crash when compiling associatedtypes with generic interface constraints. * delete hlsl.meta.slang.temp.h. * Fix.
2024-10-01SizeOfLikeExpr has type int (#5205)Ellie Hermaszewska
* Correct typo in parser * SizeOfLineExprs have type int Fixes https://github.com/shader-slang/slang/issues/5191
2024-09-30Fix diagnostics for [PreferRecompute] (#5159)Sai Praveen Bangaru
* Fix diagnostics for [PreferRecompute] * Update dont-warn-on-simple-prefer-recompute.slang * Update slang-ir-autodiff.cpp * Update dont-warn-on-simple-prefer-recompute.slang * Update warn-on-prefer-recompute-side-effects.slang
2024-09-30Add COM API for querying metadata. (#5168)Yong He
* Add COM API for querying metadata. * Fix tests. * fix test.