diff --git a/both_webgpu/both.mjs b/both_webgpu/both.mjs index 4006608..23ee7cd 100644 --- a/both_webgpu/both.mjs +++ b/both_webgpu/both.mjs @@ -1,3 +1,5 @@ +import { greeting } from "./greeting.mjs"; + async function getDeviceAndAdapter(navigator) { const adapter = await navigator.gpu.requestAdapter(); const hasSubgroups = adapter.features.has("subgroups"); @@ -26,6 +28,7 @@ async function main(navigator) { } else { console.log(" I'm probably running in a web browser."); } + greeting(); const workgroupSize = 64; const memsrcSize = 2 ** 24; diff --git a/both_webgpu/greeting.mjs b/both_webgpu/greeting.mjs new file mode 100644 index 0000000..51c2dbe --- /dev/null +++ b/both_webgpu/greeting.mjs @@ -0,0 +1,4 @@ +function greeting() { + console.log("Secret greeting!"); +} +export { greeting };