Skip to content

Commit

Permalink
generator: Skip setters on returnedonly="true" structs
Browse files Browse the repository at this point in the history
Vulkan annotates structs that are purely returned by the driver and
do not have to be constructed by users (besides initializing `sType`/
`pNext`).  For these we can skip all builder functions (except
`push_next()` and the `CStr`/slice getter helpers) and lighten our
codebase somewhat.

Note that it is still possible to update the structure in a more
low-level way by directly acessing the fields (or via FRU syntax).
For Rust-based layer implementations this may be somewhat cumbersome,
for which we could re-expose the setters behind a `cfg(feature =
"returnedonly-setters")` of sorts?
  • Loading branch information
MarijnS95 committed Dec 9, 2024
1 parent 8b0d4c5 commit 4df961a
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 7,160 deletions.
Loading

0 comments on commit 4df961a

Please sign in to comment.