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

‘WGPURenderPassDepthStencilAttachment’ has no member named ‘clearDepth’ #6

Closed bobajeff closed 1 year ago

bobajeff commented 1 year ago

When following the build instructions in the readme the make all step fails on debian bullseye at: https://github.com/samdauwe/webgpu-native-examples/blob/ba6949978298081b0c64c68268d6131b7edbad76/src/webgpu/context.c#L181

error message:

In file included from /home/monkeykong/c/projects/webgpu-native-experiments/webgpu-native-examples/src/webgpu/context.h:4,
                 from /home/monkeykong/c/projects/webgpu-native-experiments/webgpu-native-examples/src/webgpu/context.c:1:
/home/monkeykong/c/projects/webgpu-native-experiments/webgpu-native-examples/build/dawn/gen/include/dawn/webgpu.h:1291:14: note: ‘viewFormatCount’ declared here
 1291 |     uint32_t viewFormatCount;
      |              ^~~~~~~~~~~~~~~
/home/monkeykong/c/projects/webgpu-native-experiments/webgpu-native-examples/src/webgpu/context.c:181:6: error: ‘WGPURenderPassDepthStencilAttachment’ has no member named ‘clearDepth’
  181 |     .clearDepth      = 1.0f,
      |      ^~~~~~~~~~
/home/monkeykong/c/projects/webgpu-native-experiments/webgpu-native-examples/src/webgpu/context.c:182:6: error: ‘WGPURenderPassDepthStencilAttachment’ has no member named ‘clearStencil’
  182 |     .clearStencil    = 0,
      |      ^~~~~~~~~~~~
make[2]: *** [CMakeFiles/wgpu_sample_launcher.dir/build.make:277: CMakeFiles/wgpu_sample_launcher.dir/src/webgpu/context.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1640: CMakeFiles/wgpu_sample_launcher.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

my system info:

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
samdauwe commented 1 year ago

Hi bobajeff,

Thanks for letting me know about the compilation issues with latest Dawn API.

The compiler errors are fixed now and the project should compile. Could you pull the latest version to check if the changes also resolve the compiler errors on your side ?

The latest Dawn API has broken some of the examples and I disabled them in de examples list. I will look further into fixing them in the next days.

With best regards, Sam

bobajeff commented 1 year ago

Yes I just check it. It's now building for me as well. Thanks Sam.