From 5cb960a72449dad36594e8ad2bfa899f5aaa11be Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:50:52 -0500 Subject: Fix WGSL emit for '&' and add bindings for thread group size (#5557) Co-authored-by: Yong He --- source/slang-wasm/slang-wasm-bindings.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/slang-wasm/slang-wasm-bindings.cpp') diff --git a/source/slang-wasm/slang-wasm-bindings.cpp b/source/slang-wasm/slang-wasm-bindings.cpp index 8c8257795..43a516ccc 100644 --- a/source/slang-wasm/slang-wasm-bindings.cpp +++ b/source/slang-wasm/slang-wasm-bindings.cpp @@ -53,6 +53,16 @@ EMSCRIPTEN_BINDINGS(slang) allow_raw_pointers()) .function("getBindingIndex", &slang::wgsl::VariableLayoutReflection::getBindingIndex); + class_("EntryPointReflection") + .function( + "getComputeThreadGroupSize", + &slang::wgsl::EntryPointReflection::getComputeThreadGroupSize); + + class_("ThreadGroupSize") + .property("x", &slang::wgsl::EntryPointReflection::ThreadGroupSize::x) + .property("y", &slang::wgsl::EntryPointReflection::ThreadGroupSize::y) + .property("z", &slang::wgsl::EntryPointReflection::ThreadGroupSize::z); + class_("ProgramLayout") .function("toJsonObject", &slang::wgsl::ProgramLayout::toJsonObject) .function("getParameterCount", &slang::wgsl::ProgramLayout::getParameterCount) @@ -63,6 +73,10 @@ EMSCRIPTEN_BINDINGS(slang) .function( "getGlobalParamsTypeLayout", &slang::wgsl::ProgramLayout::getGlobalParamsTypeLayout, + allow_raw_pointers()) + .function( + "findEntryPointByName", + &slang::wgsl::ProgramLayout::findEntryPointByName, allow_raw_pointers()); enum_("BindingType") -- cgit v1.2.3