summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-09[Auto-diff] Overhaul auto-diff type tracking + Overhaul dynamic dispatch for ↵Sai Praveen Bangaru
differentiable functions (#5866) * Overhauled the auto-diff system for dynamic dispatch * More fixes * remove intermediate dumps * Update slang-ast-type.h * More fixes + add a workaround for existential no-diff * Update reverse-control-flow-3.slang * remove dumps * remove more dumps * Delete working-reverse-control-flow-3.hlsl * Cleanup comments + unused variables * More comment cleanup * Add support for lowering `DiffPairType(TypePack)` & `MakePair(MakeValuePack, MakeValuePack)` * Fix array of issues in Falcor tests. * Update slang-ir-autodiff-pairs.cpp * More fixes for Falcor image tests * Small fixups. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-09update slang-rhi (#6045)Simon Kallweit
2025-01-08Pass compiler specific args to GCC and Visual Studio too (#6019)Julius Ikkala
Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-08Add parentheses to make precedence explicit (#6030)Anders Leino
* Add parentheses to make precedence explicit Add parentheses for a few cases that Dawn/Tint (WGSL compiler) complains about. Closes #6005. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-08Add SampleCmpLevel intrinsics (#6004)Darren Wihandi
* add SampleCmpLevel intrinsics * update tests * fix typo * fix broken glsl test * refactor SampleCmpLevelZero * fix metallib test * fix broken test on dx12 --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-08slang-test: Ensure runtime is consistent (#6021)Anders Leino
I hit issue #5305 again after re-generating the build directory, building and then running slang-test. In other words, D3D12 and Slang-RHI/WebGPU/D3D12 failed to create a device due to the runtime being incosistent. Bilding copy-prebuilt-binaries fixed it, and so it's best to make this step a dependency of slang-test.
2025-01-07Add backtraces to examples (#5973)Anders Leino
* examples: Log stack trace on exceptions For now, this is only implemented on Windows. This helps to address #5520. * examples: Print log file if there is any * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-07Lower varying parameters as pointers instead of SSA values. (#5919)Yong He
* Add executable test on matrix-typed vertex input. * Fix emit logic of matrix layout qualifier. * Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly.
2025-01-07 Check whether array element is fully specialized (#6000)kaizhangNV
* Check whether array element is fully specialized close #5776 When we start specialize a "specialize" IR, we should make sure all the elements are fully specialized, but we miss checking the elements of an array. This change will check the it. * add test * add all wrapper types into the check * add utility function to check if the type is wrapper type --------- Co-authored-by: zhangkai <zhangkai@zhangkais-MacBook-Pro.local> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-07Add example showing how to use Slang/WASM (#5996)Anders Leino
This closes #5656.
2025-01-07Fix some robustness issues in the examples (#5984)Anders Leino
* examples: Make hello-world example exit gracefully if VK cannot be initialized - Check if VK API function pointers are valid before using them - Return 0 and exit if VK initialization fails - Enable hello-world example * examples: Fixes for ray-tracing examples - Assert that accelleration structure buffer is not nullptr - Check if buffer creation succeeded before proceeding - This makes initialization not hang, but it still fails. Therefore, the test expectations are just updated to point to another issue. - Enable ray-tracing tests on Windows
2025-01-07Use disassemble API from SPIRV-Tools (#6001)Jay Kwak
* Use disassemble API from SPIRV-Tools This commit uses C API version of SPIRV disassemble function rather than calling spirv-dis.exe. This allows us to use a correct version of SPIRV disassble function that Slangc.exe is using. The implementation is mostly copied from external/spirv-tools/tools/dis/dis.cpp, which is a source file for building spirv-dis.exe. This commit also includes a fix for a bug in RPC communication to `test-server`. When an RPC connection to `test-server.exe` is reused and the second test abruptly fails due to a compile error or SPIRV validation error, the output from the first test run was incorrectly reused as the output for the second test. This commit resets the RPC result before waiting for the response so that even when the RPC connection is erratically disconnected, the result from the previous run will not be reused incorrectly. Some of the tests appear to be relying on this type of behavior. By using an option, `-skip-spirv-validation`, the RPC connection will continue without an interruption.
2025-01-06Properly set D3D12SDKPath (#5993)Jay Kwak
* Properly set D3D12SDKPath Closes https://github.com/shader-slang/slang/issues/5992 This commit have an effect on slang-test.exe and test-server.exe. When we run slang-test.exe, it uses D3D12Core.DLL located at `build/{Release,Debug}/bin/D3D12`, which is `D3D12` from where the executable file is located at. This has been working fine but we found a case where it doesn't work properly. This commit sets D3D12SDKPath value explicitly to avoid potential problems.
2025-01-06Add `Bindless<T>` proposal. (#6002)Yong He
* Add `Bindless<T>` proposal. * Clarify on what happesn if native bindless T has different size/alignment. * Add discussion on alternatives. * Update reviewer.
2025-01-06Add support for textureLod with sampler2DArrayShadow (#6009)Julius Ikkala
2025-01-05Fix GLSL mix(T,T,bool) SPIR-V output (#6006)Julius Ikkala
2025-01-05CI: Build the full slang-wasm.[js|wasm] targets instead of just the slang ↵Anders Leino
library. (#5998) A recent build breakage for slang-wasm.[js|wasm] was not noticed by CI since it built the slang library target instead of the slang-wasm.js "executable" target. (We added a that used objcopy to split debug info from executables. objcopy does not report errors when it finds object files with unexpected format inside static libraries, but it *does* report errors when it's run on an exceutable of unexpected format, such as in the case of slang-wasm.js.) This closes #5959.
2025-01-04Make 'shared' keyword map to 'groupshared' in GLSL mode (#6003)Julius Ikkala
2025-01-03Create DirectDeclRef when creating Decl to prevent invalid dedup. (#5945)Yong He
* Create DirectDeclRef when creating Decl to prevent invalid dedup. * Fix test. * fix * update slang-rhi
2025-01-03Fix parameter location reflection for pure data paramblocks. (#5956)Yong He
2025-01-02Correct IR generation for no-diff pointer type (#5976)kaizhangNV
* Correct IR generation for no-diff pointer type Close #5805 There is an issue on checking whether a pointer type parameter is no_diff, we should first check whether this parameter is an Attribute type first, then check the data type. In the back-propagate pass, for the pointer type parameter, we should load this parameter to a temp variable, then pass it to the primal function call. Otherwise, the temp variable will no be initialized, which will cause the following calculation wrong.
2025-01-01Allow explicit test root (#5980)bspeice
2025-01-01Fixed incorrect condition in Session::queryInterface. (#5978)Pétur Darri Pétursson
An AND operator was used where an OR should have been used.
2024-12-31add missing IR_LEAF_ISA for MetalMeshType (#5975)Darren Wihandi
Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-01Fix reflection for metal vector [[id]] location. (#5943)Yong He
2024-12-31Add terminateRayEXT & ignoreIntersectionEXT (#5974)Julius Ikkala
2024-12-31Fix `getInheritanceInfo` for `ExtractExistentialType`. (#5971)Yong He
2024-12-30Check for undefined %id in spirv_asm block. (#5966)Yong He
2024-12-30LanguageServer: fix highlighting of wrapper type. (#5968)Yong He
2024-12-30Add `RaytracingAccelerationStructure::__init(uint64_t)`. (#5967)Yong He
2024-12-30Check mismatching method parameter direction against interface declaration. ↵Yong He
(#5964)
2024-12-30Fix requirement candidate lookup to prefer decls in the same paraent as the ↵Yong He
inheritance decl. (#5965)
2024-12-30Add a basic WebGPU example (#5923)Anders Leino
* Add a basic WebGPU example This helps to address #5656. * Use serial await rather than Promise.all
2024-12-30Skip uninitialized-use warning on hitAttributeEXT-decorated globals (#5952)Julius Ikkala
2024-12-29Prevent constant folding for specialization constants (#5953)Julius Ikkala
2024-12-28Implement HLSL pack/unpack math intrinsics (#5934)Darren Wihandi
2024-12-28Fix tiny typos (#5944)Yuki Nishidate
2024-12-27Fix parsing GLSL SSBO arrays / bindless descriptors (#5932)Julius Ikkala
* Fix parsing GLSL SSBO arrays / bindless descriptors * Clean up SSBO array parsing * Fix mutable SSBO arrays not being detected as such * Allow sized SSBO arrays * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-26Add packed 8bit builtin types (#5939)Darren Wihandi
* Add packed bytes builtin type * fix test
2024-12-26Support dispatchComputeIndirect and draw(Indexed)Indirect with count buffer ↵AdamYuan
for Vulkan (#5929) * Support gfx ComputeCommandEncoder::dispatchComputeIndirect for Vulkan * Support count buffer for Vulkan in gfx RenderCommandEncoder::drawIndirect and RenderCommandEncoder::drawIndexedIndirect * Fix an unintended change * Fix format issue --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-24Reflection API Wasm Bindings Part1 (#5936)arya
* add a lot of missing classes, functios and enums * typescript defintion generation * formatting * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-12-23update CTS package (#5935)kaizhangNV
2024-12-21Fixed stage and result field names in json reflection (#5927)Stan
2024-12-20Fix WASM build (#5925)Anders Leino
There is no objcopy and strip for WASM, so disable debug info stripping. This closes #5924.
2024-12-20Check subscript/property accessor for differentiability. (#5922)Yong He
2024-12-20Fix crash during loop unrolling. (#5920)Yong He
2024-12-19Add base vertex and base instance system values (#5918)Darren Wihandi
* Add base vertex and base instance system values * Fixed incorrect stage in tests
2024-12-19Enable more examples in CI (#5915)Anders Leino
* CI: examples: Add support for filtering on platform * Add platform field to example run IDs - Remove the reflection-api entry for Windows. - Add 'aarch64' as platform for all 'macos' entries. - Add 'x86_64' as platform for all other entries. - This will implicitly enable all aarch64 tests for Linux. This helps to address issue #5520.
2024-12-19Add HLSL texture sample with status intrinsics (#5901)Darren Wihandi
* Implement HLSL texture sample with status intrinsics * fix test and cleanup --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-19Readme corrections (#5874)Ellie Hermaszewska
Closes https://github.com/shader-slang/slang/issues/4806