summaryrefslogtreecommitdiff
path: root/source/slang
AgeCommit message (Collapse)Author
2024-10-28Replace the word stdlib or standard-library with core-module for source code ↵Jay Kwak
(#5415) This commit changes the word "stdlib" or "standard library" to "core module" in the source code.
2024-10-28Assorted auto-diff enhancements for increased performance & more streamlined ↵Sai Praveen Bangaru
auto-diff results (#5394) * Various AD enhancements * Fix issue with pt-loop test * Update pt-loop.slang * More fixes for perf. Final minimal context test now passes. * Fix issue with loop-elimination pass not running after dce * Try fix wgpu test by removing select operator * Disable wgpu * Delete out.wgsl * Remove comments * Update slang-ir-util.cpp * Fix header relative paths for slang-embed * Disbale wgpu for a few other tests * Better way of determining which params to ignore for side-effects * Update slang-ir-dce.cpp * Fix issue with circular reference from previous AD pass being left behind for the next AD pass * Update slang-ir-dce.cpp
2024-10-28Add documentation for buffer types (#5410)kaizhangNV
* Add documentation for buffer types * address comments * Update doc for LoadxAligned functions Update the doc for all Load{2,3,4}Aligned and LoadxAligned<T> functions of buffer type. We assume that those aligned version of Load{2,3,4} and Load<T> will treat the whole buffer as type of unit{2,3,4} or T, so the address must be aligned to size of the loaded type. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-10-28More wasm binding for playground. (#5420)Yong He
2024-10-27Export language server to wasm. (#5419)Yong He
2024-10-27Add implicit cast for generic vector types. (#5413)Yong He
2024-10-27Add `InterlockedAddF64` intrinsic. (#5412)Yong He
2024-10-25Replace stdlib with core-module on files and projects (#5411)Jay Kwak
This commit renames the files and projects to prefer "core-module" over "stdlib". The directory name `source/slang-stdlib` needs to be renamed too, and there will be another commit for it soon.
2024-10-25Replace stdlib on Slang API with CoreModule (#5405)Jay Kwak
This is a breaking change in a way that the Slang API function names are changed. All of them are commented as "experimental" and we wouldn't provide a back-ward compatibility for them. Following functions are renamed: compileStdLib() -> compileCoreModule() loadStdLib() -> loadCoreModule() saveStdLib() -> saveCoreModule() slang_createGlobalSessionWithoutStdLib() -> slang_createGlobalSessionWithoutCoreModule() slang_getEmbeddedStdLib() -> slang_getEmbeddedCoreModule() hasDeferredStdLib() -> hasDeferredCoreModule() Following command-line arguments are renamed: "-load-stdlib" -> "-load-core-module" "-save-stdlib" -> "-save-core-module" "-save-stdlib-bin-source" -> "-save-core-module-bin-source" "-compile-stdlib" -> "-compile-core-module"
2024-10-24Fix incorrect debug assert in `getLanguagePrelude`. (#5402)Yong He
* Fix incorrect debug assert in `getLanguagePrelude`. * Fix.
2024-10-24Use DebugDeclare instead of DebugValue. (#5404)Yong He
* Use DebugDeclare instead of DebugValue. * Avoid generating illegal SPIRV. * Improve DebugLine output. * Fix. * Fix. * Misc improvements.
2024-10-24Fix language server crash. (#5395)Yong He
2024-10-23Fix several bugs with `specializeWithArgTypes()` (#5365)Sai Praveen Bangaru
* Fix several bugs with `specializeWithArgTypes()` * Make all types L-values for the purposes of reflection API resolution
2024-10-23Document the interfaces in the core module (#5374)Jay Kwak
Co-authored-by: Yong He <yonghe@outlook.com>
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-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-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-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-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-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-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-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>