Comment

Comment by scoopr

Nice, always good to have some extra checking.

While most of the time you want the memcpy semantics, but I wonder if naga could be used to compute a facet SHAPE from the shader. Maybe it could be used to "serialise" the cpu format to gpu format, without them needing to be padding/repr-compatible (or even field-reorder-compatible!).

Another option of course would be to parse the struct with naga and just always generate the rust counterpart, then it should always be compatible and up-to-date, but then you have codegen in your build step.

parent scoopr 1 month ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton