henrybetts / swift-webgpu

Swift bindings for WebGPU
MIT License
78 stars 3 forks source link

Support for newer versions of swift #7

Closed kerimcharfi closed 1 week ago

kerimcharfi commented 1 year ago

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
henrybetts commented 1 year ago

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 commented 1 year ago

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