summaryrefslogtreecommitdiffstats
path: root/source
Commit message (Collapse)AuthorAge
* Replace the word stdlib or standard-library with core-module for source code ↵Jay Kwak2024-10-28
| | | | | (#5415) This commit changes the word "stdlib" or "standard library" to "core module" in the source code.
* Rename a directory `source/slang-stdlib` to slang-core-module (#5417)Jay Kwak2024-10-28
| | | | The directory name of `source/slang-stdlib` is changed to `source/slang-core-module`. We will use the term "core module" instead of "standard library" from now on.
* Assorted auto-diff enhancements for increased performance & more streamlined ↵Sai Praveen Bangaru2024-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add documentation for buffer types (#5410)kaizhangNV2024-10-28
| | | | | | | | | | | | | | | | * 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>
* More wasm binding for playground. (#5420)Yong He2024-10-28
|
* Export language server to wasm. (#5419)Yong He2024-10-27
|
* Add implicit cast for generic vector types. (#5413)Yong He2024-10-27
|
* Add `InterlockedAddF64` intrinsic. (#5412)Yong He2024-10-27
|
* Replace stdlib with core-module on files and projects (#5411)Jay Kwak2024-10-25
| | | | | | | 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.
* Replace stdlib on Slang API with CoreModule (#5405)Jay Kwak2024-10-25
| | | | | | | | | | | | | | | | | | 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"
* Fix incorrect debug assert in `getLanguagePrelude`. (#5402)Yong He2024-10-24
| | | | | * Fix incorrect debug assert in `getLanguagePrelude`. * Fix.
* Use DebugDeclare instead of DebugValue. (#5404)Yong He2024-10-24
| | | | | | | | | | | | | * Use DebugDeclare instead of DebugValue. * Avoid generating illegal SPIRV. * Improve DebugLine output. * Fix. * Fix. * Misc improvements.
* wasm: Add compile target option when creating slang session (#5403)kaizhangNV2024-10-24
| | | | | | | | | | | | | * wasm: Add compile target option when creating slang session Also add a new interface to return spirv code which is binary, because 'std::string ComponentType::getEntryPointCode' is not suitable for returning the binary data. We use a more standard way that wrap the binary data by using emscripten::val as the return type. * Add target of metal
* Fix language server crash. (#5395)Yong He2024-10-24
|
* declutter top level CMakeLists.txt (#5391)Ellie Hermaszewska2024-10-24
| | | | | | | | | | | | | | | | | | | | | * Split examples cmake desc * declutter top level CMakeLists.txt * fail if building tests without gfx * Move llvm fetching to another cmake file * Further split CMakeLists.txt * Neaten llvm fetching * Remove last premake remnant * correct cross builds * Neaten * Neaten project organization in vs
* Fix several bugs with `specializeWithArgTypes()` (#5365)Sai Praveen Bangaru2024-10-23
| | | | | * Fix several bugs with `specializeWithArgTypes()` * Make all types L-values for the purposes of reflection API resolution
* Document the interfaces in the core module (#5374)Jay Kwak2024-10-23
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* Document bit operations (#5373)cheneym22024-10-23
| | | | | | | * Document bit operations Fixes #5307 * Update hlsl.meta.slang
* Document derivative core module functions (#5369)cheneym22024-10-22
|
* Recognize a new spirv header json grammar keyword "aliases" (#5367)Jay Kwak2024-10-21
| | | | | | | | | * 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.
* Fix spirv codegen for pointer to empty structs. (#5355)Yong He2024-10-21
|
* Stdlib documentation for Atomic, Optional, Tuple (#5358)Ellie Hermaszewska2024-10-21
|
* Add more doc for builtin interfaces. (#5357)Yong He2024-10-21
|
* Mark SPIRV artifact as non-executable. (#5356)Yong He2024-10-20
|
* Properly check switch case. (#5341)Yong He2024-10-20
|
* Remove use of Variable Pointer capability. (#5352)Yong He2024-10-19
| | | * Remove use of Variable Pointer capability.
* Use `VariablePointersStorageBuffer` instead of `VariablePointer` spv … (#5340)Yong He2024-10-18
|
* Cleanup definition of `printf`. (#5330)Yong He2024-10-17
| | | | | | | | | | | * Cleanup definition of `printf`. * Fix. * Fix spirv generation. * Fix. * enhance test.
* Cleanup atomic intrinsics. (#5324)Yong He2024-10-17
| | | | | | | | | | | | | | | | | | | * 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.
* Add 'findAndCheckEntryPoint' to wasm binding (#5337)kaizhangNV2024-10-17
|
* Fix D3D12Core.dll loading problem (#5315)Jay Kwak2024-10-17
| | | | | | | | | | | | | | | | | | 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
* Fix entrypoint naming in glsl backend. (#5320)Yong He2024-10-16
|
* Fix spirv debug info for pointer types. (#5319)Yong He2024-10-16
| | | | | * Fix spirv debug info for pointer types. * fix comment.
* Fix type checking on generic extensions. (#5316)Yong He2024-10-15
| | | Add fcpw library to test suite.
* Add stdlib documentation for attributes and interfaces. (#5297)Yong He2024-10-15
| | | | | | | * Add stdlib documentation for attributes and interfaces. * Fix name mangling to avoid collision of functions in different extensions. * Fix doc.
* Move C interface from slang.h to slang-deprecated.h (#5301)Ellie Hermaszewska2024-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Enable WebGPU tests in CI (#5239)Anders Leino2024-10-15
|
* Fix unexported spReflectionEntryPoint_GetFunction (#5260)cupofc0t2024-10-14
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* Misc build fixes. (#5271)Yong He2024-10-14
| | | | | | | | | | | | | | | | | * 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.
* Fix release build failure (#5285)Ellie Hermaszewska2024-10-14
| | | | | | | | | | | | | * 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>
* Fix assert when compiling an entrypoint that calls another entrypoint. (#5268)Yong He2024-10-14
| | | | | * Fix assert when compiling an entrypoint that calls another entrypoint. * Fix test.
* Write out summary of documentation in docgen tool. (#5266)Yong He2024-10-14
|
* Fix race condition for building stdlib headers (#5272)Ellie Hermaszewska2024-10-13
| | | Fixes https://github.com/shader-slang/slang/issues/5270
* Restrict stdlib embed macros to single source file (#5251)Ellie Hermaszewska2024-10-11
| | | | | | | * 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
* Add slang-wasm target (#5237)Anders Leino2024-10-11
| | | | | | 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")
* WGSL: Enable load & store from byte-addressible buffers (#5252)Anders Leino2024-10-11
|
* Fix links in stdlib reference category landing page. (#5250)Yong He2024-10-10
|
* Support constant folding for static array access. (#5248)Yong He2024-10-09
| | | | | * Support constant folding for static array access. * Fix test.
* Use user defined type name in glsl buffer declarations. (#5242)Yong He2024-10-09
|
* Fix precompiled glsl modules (#5230)cheneym22024-10-09
| | | | | | | When precompiling modules defined with glsl, it's necessary to link in the glsl definition module. Reuse the public fillRequirements declaration