LearnWebGPU-Code
LearnWebGPU-Code copied to clipboard
step095-emscripten doesn't compile with enum issue
This happens after running
emcmake cmake . -B build-web
cmake --build build-web
the error:
/home/blin/LearnWebGPU-Code/build-web/_deps/webgpu-backend-emscripten-src/include/webgpu/webgpu.hpp:226:1: error: unknown type name 'WGPUComputePassTimestampLocation'; did you mean 'ComputePassTimestampLocation'?
226 | ENUM(ComputePassTimestampLocation)
| ^
/home/blin/LearnWebGPU-Code/build-web/_deps/webgpu-backend-emscripten-src/include/webgpu/webgpu.hpp:104:10: note: expanded from macro 'ENUM'
104 | typedef WGPU ## Type W; /* W == WGPU Type */ \
| ^
<scratch space>:325:1: note: expanded from here
325 | WGPUComputePassTimestampLocation
| ^
/home/blin/LearnWebGPU-Code/build-web/_deps/webgpu-backend-emscripten-src/include/webgpu/webgpu.hpp:226:6: note: 'ComputePassTimestampLocation' declared here
226 | ENUM(ComputePassTimestampLocation)
| ^
/home/blin/LearnWebGPU-Code/build-web/_deps/webgpu-backend-emscripten-src/include/webgpu/webgpu.hpp:226:1: warning: conversion function converting 'wgpu::ComputePassTimestampLocation' to itself will never be used [-Wclass-conversion]
226 | ENUM(ComputePassTimestampLocation)
| ^
/home/blin/LearnWebGPU-Code/build-web/_deps/webgpu-backend-emscripten-src/include/webgpu/webgpu.hpp:106:2: note: expanded from macro 'ENUM'
106 | operator W() { return m_raw; } \
| ^
/home/blin/LearnWebGPU-Code/build-web/_deps/webgpu-backend-emscripten-src/include/webgpu/webgpu.hpp:226:1: error: field has incomplete type 'W' (aka 'wgpu::ComputePassTimestampLocation')
/home/blin/LearnWebGPU-Code/build-web/_deps/webgpu-backend-emscripten-src/include/webgpu/webgpu.hpp:108:4: note: expanded from macro 'ENUM'
108 | W m_raw; \
Versions
- Emscripten version 3.1.51