From 0037233a81aa4e2d24ed9f979172e3906046efc8 Mon Sep 17 00:00:00 2001 From: John Owens Date: Tue, 5 Nov 2024 15:17:25 -0800 Subject: [PATCH] both.mjs now imports greeting.mjs --- both_webgpu/both.mjs | 3 +++ both_webgpu/greeting.mjs | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 both_webgpu/greeting.mjs 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 };