Skip to content

Commit 9291fb5

Browse files
authored
Update WebGPUDemo/Sources/Entrypoint.swift
1 parent b55dbfe commit 9291fb5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

WebGPUDemo/Sources/Entrypoint.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ struct Entrypoint {
3838
let gpu = Window.global.navigator.gpu
3939

4040
do throws(JSException) {
41+
// Using promises instead of `async` functions due to https://github.com/swiftlang/swift/issues/83750
4142
let adapterPromise: JSPromise = gpu.requestAdapter()
4243
let devicePromise = JSPromise(from: try await adapterPromise.value().requestDevice())!
4344
let device = try await GPUDevice(unsafelyWrapping: devicePromise.value().object!)

0 commit comments

Comments
 (0)