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 latest WebGPU WebIDL #2353

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

grovesNL
Copy link
Contributor

@grovesNL grovesNL commented Nov 11, 2020

Update to latest WebGPU WebIDL as of November 7.

Like in #2267, there are some temporary changes from the upstream WebIDL for Gecko:

  • Define GPUCode as typedef (USVString or Uint32Array) GPUCode; to allow both SPIR-V and WGSL for now
  • Continue to use the old signature for set_index_buffer because that's what Gecko is currently using

I have the latest rustfmt as far as I can tell, but regenerating the bindings seems to shift things around by adding extra spaces in attributes. Is there a specific version of rustfmt I should be using? I currently have a formatting commit but I'll remove it if I can fix this.

@grovesNL grovesNL marked this pull request as draft November 11, 2020 04:53
@alexcrichton
Copy link
Contributor

Thanks! According to CI though it looks like your local rustfmt may be doing something differently? Maybe a global config file? We should just be using the default rustfmt settings for the stable channel to format everything

@@ -632,7 +634,7 @@ IirFilterOptions = []
ImageBitmap = []
ImageBitmapFormat = []
ImageBitmapRenderingContext = []
ImageCapture = ["EventTarget"]
ImageCapture = []
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(this wasn't related to the WebGPU changes, but it was removed when I regenerated the bindings)

@grovesNL
Copy link
Contributor Author

Thanks for taking a look! Yeah I noticed the CI check failing and looked into this a bit more. I freshly cloned the repository and the formatting issue disappeared, so it turns out it wasn't related to rustfmt at all.

Instead it seems to be caused by the output of proc-macro2 when it's formatting the attribute initially. I had an older version in my Cargo.lock, so I updated proc-macro2 (cargo update -p proc-macro2) and the formatting is alright again. It was probably a small change in the proc-macro2 output (maybe dtolnay/proc-macro2/pull/246).

I think everything should be alright now.

@grovesNL grovesNL marked this pull request as ready for review November 12, 2020 02:08
@alexcrichton
Copy link
Contributor

Ah right yes forgot about that!

@alexcrichton alexcrichton merged commit 316c5a7 into rustwasm:master Nov 12, 2020
@grovesNL grovesNL deleted the update-webgpu-nov-7 branch November 12, 2020 04:10
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

Successfully merging this pull request may close these issues.

2 participants