summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAnders Leino <aleino@nvidia.com>2024-10-07 20:16:19 +0300
committerGitHub <noreply@github.com>2024-10-07 10:16:19 -0700
commit509409ef11e3b1abd1d7e1bfb540bc172aa1a817 (patch)
treea72725310c63b5224e76a79a4cb9b8ab9984cbc5 /include
parentff51c21ba217fe18bf22fec7bf822cde779b265d (diff)
Add WGSL support for slang-test (#5174)
* 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>
Diffstat (limited to 'include')
-rw-r--r--include/slang-gfx.h1
-rw-r--r--include/slang.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/include/slang-gfx.h b/include/slang-gfx.h
index d273ce427..207b3e136 100644
--- a/include/slang-gfx.h
+++ b/include/slang-gfx.h
@@ -92,6 +92,7 @@ enum class DeviceType
Metal,
CPU,
CUDA,
+ WebGPU,
CountOf,
};
diff --git a/include/slang.h b/include/slang.h
index 6e4ab6250..cfee7eedc 100644
--- a/include/slang.h
+++ b/include/slang.h
@@ -610,6 +610,8 @@ extern "C"
SLANG_METAL_LIB_ASM, ///< Metal library assembly
SLANG_HOST_SHARED_LIBRARY, ///< A shared library/Dll for host code (for hosting CPU/OS)
SLANG_WGSL, ///< WebGPU shading language
+ SLANG_WGSL_SPIRV_ASM, ///< SPIR-V assembly via WebGPU shading language
+ SLANG_WGSL_SPIRV, ///< SPIR-V via WebGPU shading language
SLANG_TARGET_COUNT_OF,
};
@@ -643,7 +645,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_TINT, ///< Tint WGSL compiler
SLANG_PASS_THROUGH_COUNT_OF,
};