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.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/slang-wasm/slang-wasm.cpp') diff --git a/source/slang-wasm/slang-wasm.cpp b/source/slang-wasm/slang-wasm.cpp index 10fc86029..a1ce2920d 100644 --- a/source/slang-wasm/slang-wasm.cpp +++ b/source/slang-wasm/slang-wasm.cpp @@ -442,6 +442,18 @@ TypeLayoutReflection* ProgramLayout::getGlobalParamsTypeLayout() return (slang::wgsl::TypeLayoutReflection*)(interface()->getGlobalParamsTypeLayout()); } +EntryPointReflection* ProgramLayout::findEntryPointByName(std::string name) +{ + return (slang::wgsl::EntryPointReflection*)(interface()->findEntryPointByName(name.c_str())); +} + +EntryPointReflection::ThreadGroupSize EntryPointReflection::getComputeThreadGroupSize() +{ + SlangUInt size[3]; + interface()->getComputeThreadGroupSize(3, size); + return {size[0], size[1], size[2]}; +} + BindingType TypeLayoutReflection::getDescriptorSetDescriptorRangeType( unsigned int setIndex, unsigned int rangeIndex) -- cgit v1.2.3