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

Use proc macros for Rust-side encoding #10

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Use proc macros for Rust-side encoding #10

wants to merge 6 commits into from

Conversation

raphlinus
Copy link
Contributor

Replace hand-rolled (and unsafe) encoding on the Rust side with proc macros. This involves some reorganization of the structures to make sure the gpu-types can be used both as a library and a binary, the latter of which outputs shader headers.

Putting up as a PR, and it could be merged at this stage. As of this checkpoint, the per-tile command list is still using the old Metal shader headers, pre the merge with HLSL; that's next.

raphlinus and others added 6 commits February 5, 2020 16:57
WIP

Add Rust-side encoding of GPU types, so we can fill a buffer and send
it to the GPU. This includes a fair amount of reorganization.
Encode enum variants with (hopefully correct) offsets. Some more
convenience methods for encoding, including vectors.
support for inline structs
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