Skip to content

Failure to build with no-fake-scoped-enums with emscripten #27

Description

@slowriot

When generating with fake scoped enums disabled, using the latest emscripten webgpu.h, I see multiple compilation errors from the WEBGPU_CPP_IMPLEMENTATION section of webgpu.h.

To generate:

python3 ./generate.py -u webgpu.h -t emscripten/webgpu.template.hpp -o webgpu.hpp -d defaults.txt -d extra-defaults.txt --no-fake-scoped-enums

When building, I get compilation errors such as:

webgpu.hpp:1341:16: fatal error: assigning to 'WGPUBackendType' from incompatible type 'wgpu::BackendType'
 1341 |         backendType = BackendType::Undefined;
      |                       ^~~~~~~~~~~~~~~~~~~~~~

These could be resolved with a change like backendType = static_cast<WGPUBackendType>(BackendType::Undefined).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions