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

Rust gpu up #12

Merged
merged 3 commits into from
Nov 1, 2021
Merged

Rust gpu up #12

merged 3 commits into from
Nov 1, 2021

Conversation

DJMcNab
Copy link
Collaborator

@DJMcNab DJMcNab commented Oct 31, 2021

Update the version of rust-gpu we use to my branch https://github.com/DJMcNab/rust-gpu/tree/more-decorations, which has @charles-r-earp's EmbarkStudios/rust-gpu#692 to fix EmbarkStudios/rust-gpu#689, plus a fix to actually make it usable for the types of image we use.

It also upgrades wgpu to 0.11.

This time, we don't even need to bypass naga; it all works now 🎉

As a side note, we're still affected by the 'transiently required' issue as mentioned in EmbarkStudios/rust-gpu#778. That is, if we enable the Int8 capability, then we can use && in the shader. No 8 bit integers are actually generated however.

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

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

Looks good, and works fine for me. (I ran into rust-lang/rustup#988 which is a risk of using a pinned nightly toolchain, but that's nothing wrong with this patch). Thanks!

})
.await
.expect("error finding adapter");
let features = wgpu::Features::PUSH_CONSTANTS;
let features = wgpu::Features::PUSH_CONSTANTS /* | wgpu::Features::SPIRV_SHADER_PASSTHROUGH */;
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL about wgpu::util::make_spirv and the fact it doesn't need this. Generally I prefer not to have commented-out code, so maybe remove this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it depends on whether the shader can be translated using naga or not. I think the main rust-gpu repo is still using passthrough, but I also think that they should be able to use naga now.

@raphlinus raphlinus merged commit bc42381 into googlefonts:main Nov 1, 2021
@DJMcNab DJMcNab deleted the rust-gpu-up branch November 1, 2021 19:06
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.

Support for NonReadable, NonWritable
2 participants