samdauwe / webgpu-native-examples

Collection of C-language examples that demonstrate basic rendering and computation in WebGPU native.
Apache License 2.0
373 stars 21 forks source link

Build error of latest commit #9

Closed LimpingTwerp closed 1 year ago

LimpingTwerp commented 1 year ago

Hey friend,

trying to learn from your code.

Tried to build and encountered this error:

[ 87%] Building CXX object CMakeFiles/wgpu_native.dir/lib/wgpu_native/wgpu_native.cpp.o
/home/kai/git/webgpu-native-examples/lib/wgpu_native/wgpu_native.cpp: In function ‘WGPUAdapterImpl* WGPUImpl::RequestAdapter(WGPURequestAdapterOptions*)’:
/home/kai/git/webgpu-native-examples/lib/wgpu_native/wgpu_native.cpp:122:40: error: ‘class dawn::native::Instance’ has no member named ‘EnumerateAdapters’
  122 |     = gpuContext.dawn_native.instance->EnumerateAdapters();
      |                                        ^~~~~~~~~~~~~~~~~
/home/kai/git/webgpu-native-examples/lib/wgpu_native/wgpu_native.cpp: In function ‘void WGPUImpl::LogAvailableAdapters()’:
/home/kai/git/webgpu-native-examples/lib/wgpu_native/wgpu_native.cpp:149:52: error: ‘class dawn::native::Instance’ has no member named ‘EnumerateAdapters’
  149 |   for (auto&& a : gpuContext.dawn_native.instance->EnumerateAdapters()) {
      |                                                    ^~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/wgpu_native.dir/build.make:76: CMakeFiles/wgpu_native.dir/lib/wgpu_native/wgpu_native.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1463: CMakeFiles/wgpu_native.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Any hints would be appreciated a lot! Lots of love, Kai

LimpingTwerp commented 1 year ago

Hello Kai,

thanks for engaging with the project. Have you tried updating dawn?

Best, Kai

LimpingTwerp commented 1 year ago

That did the trick,

Thanks Kai!