Skip to content

Commit

Permalink
Implement math intrinsics for WGSL (shader-slang#5078)
Browse files Browse the repository at this point in the history
* Implement math intrinsics for WGSL

This commit implements math related intrinsics and a few others for
WGSL.

The implementation is based on the following doc,
 https://www.w3.org/TR/WGSL

slang-test was looking for the downstream compiler for WGSL even though
it is not used.
This commit adds a minimal change to avoid the crash.
  • Loading branch information
jkwak-work authored Sep 17, 2024
1 parent 25d1559 commit 0716646
Show file tree
Hide file tree
Showing 6 changed files with 591 additions and 180 deletions.
1 change: 1 addition & 0 deletions include/slang.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ extern "C"
SLANG_PASS_THROUGH_LLVM, ///< LLVM 'compiler' - includes LLVM and Clang
SLANG_PASS_THROUGH_SPIRV_OPT, ///< SPIRV-opt
SLANG_PASS_THROUGH_METAL, ///< Metal compiler
SLANG_PASS_THROUGH_WGSL, ///< WGSL compiler
SLANG_PASS_THROUGH_COUNT_OF,
};

Expand Down
Loading

0 comments on commit 0716646

Please sign in to comment.