swift-webgpu icon indicating copy to clipboard operation
swift-webgpu copied to clipboard

Support for newer versions of swift

Open kerimcharfi opened this issue 2 years ago • 2 comments

HI! looks like a cool project! However I've got some problems getting it up and running.

Im currently facing a lot of errors:

using '!' is not allowed here; perhaps '?' was intended?
public typealias CreateRenderPipelineAsyncCallback = (CreatePipelineAsyncStatus, RenderPipeline, String, UnsafeMutableRawPointer!) -> ()

Which was introduced years ago to swift. What version of swift does work? Is there a plan to support newer versions?

I somewhat hacked it to compile by changing the code gen, however only DemoInfo runs. The other fail with:

Using adapter: AMD Radeon RX Vega (RADV VEGA10)
Illegal instruction (core dumped

kerimcharfi avatar Jun 12 '23 15:06 kerimcharfi

Looks like there was a recent change to the format of dawn.json which probably explains the build errors. Not entirely sure why they've made that change, but I'll probably need to have a look at the code generator to accommodate it.

As for the second issue, I'm not entirely sure. Have you tried running dawn's samples (CHelloTriangle etc.)? If they work then at least we'll know that it's a problem in the swift domain.

henrybetts avatar Jun 13 '23 21:06 henrybetts

The issues with the code generation should be fixed with 44f87e7b2644f8f5aa2580b39a4d306368d1e74a.

henrybetts avatar Jun 13 '23 23:06 henrybetts