Benjamin Saunders

Results 929 comments of Benjamin Saunders

https://github.com/Ralith/oddio/blob/main/.github/workflows/rust.yml

Unfortunately I think this is impossible for slices, because Vulkan lays out the length inline in the struct, and we have absolutely no guarantee that the resulting layout would match...

> Likewise should we reconsider making fn build unsafe? I don't think this accomplishes anything, for two reasons: - Vulkan code is almost invariably deep inside a big `unsafe` block...

> Like this? Yep, that's what I was thinking of. > a separate count + reference to first element can work. Of course, this means you lose checking on the...

> I was initially a bit worried that people who want to store these types would have to worry about the lifetimes. You could store a `'static` version using `None`...

> Would a &'a borrowing the first element work, considering it's just a pointer? That only opens up confusing API though. Yes, but I agree it's a bit confusing. Then...

Adopting references for non-array stuff and moving all setters to the actual Vulkan structs rather than builders should be uncontroversial and a big win on its own; we can then...

Sounds like a good reason to pursue this as part of the new generator, then!

https://github.com/MaikKlein/ash/pull/602 is a big step in this direction.

> I'll test and post some build-timings later, see if +2300 trivial trait implementation lines have any effect. Easy enough to cfg-gate if needed, since it's a new trait.