Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to @webgpu/glslang 0.0.7 #23

Closed
beaufortfrancois opened this issue Sep 4, 2019 · 5 comments
Closed

Update to @webgpu/glslang 0.0.7 #23

beaufortfrancois opened this issue Sep 4, 2019 · 5 comments

Comments

@beaufortfrancois
Copy link
Collaborator

When using @webgpu/glslang 0.0.7, code below is needed in glsl.macro.js. However this is not working as babel-plugin-macros expect synchronous code to happen, causing GLSL to be undefined.

const glslangPromise = new Promise(resolve => {
  glslangModule().then(glslang => {
    resolve(glslang);
  });
});
const glslang = await glslangPromise;
const code = glslang.compileGLSL(source, stage, false);

How can we solve this @kainino0x?

@beaufortfrancois
Copy link
Collaborator Author

FYI @Kangz

@kainino0x
Copy link
Collaborator

The Node build is supposed to load synchronously, not asynchronously. It's possible that I messed up the Node build in the 0.0.7 release.

In any case, the Node build wasn't supposed to change functionally at all between 0.0.6 and 0.0.7, so there's no reason to upgrade. We shouldn't have to change or update how cts uses glslang until we switch to something more final.

@beaufortfrancois
Copy link
Collaborator Author

How about freezing 0.0.6 release in package.json so that newcomers don't get bitten?

@kainino0x
Copy link
Collaborator

If there is something wrong with the node build I guess I should just fix it and rerelease

@kainino0x kainino0x reopened this Sep 5, 2019
@kainino0x
Copy link
Collaborator

Fixed with @webgpu/glslang 0.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants