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

Remove a lot of vec! macro invocations from Assemble #165

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

Jasper-Bekkers
Copy link
Collaborator

This adds a assemble_into which just produces SPIR-V into a Vec<u32> instead of making lots and lots of new ones, this should reduce the assemble functions heap traffic quite a bit. This should address #96 and help me out at the same time.

… to push to a Vec to save some heap traffic
Copy link
Collaborator

@khyperia khyperia left a comment

Choose a reason for hiding this comment

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

Would be nice to take a std::io::Write instead of a Vec, but this is better than before, so ✔️

@Jasper-Bekkers
Copy link
Collaborator Author

I thought of that - but io::Write (or io::Cursor) mostly operates on bytes so we'd just be doing a bunch of back and forth between u32 and u8's. Since SPIR-V is naturally expressed as u32's, this seemed like the easier / more ergonomic option.

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.

None yet

2 participants