Skip to content

Conversation

@alexheretic
Copy link
Contributor

@alexheretic alexheretic commented Jan 26, 2023

Fixes issues exposed by rust 1.67 field ordering changes (rust-lang/rust#102750)

This PR adds #[repr(C)] to vertex & constant structs preventing field ordering issues.

Note: This actually still works fine even if users have manually specified #[repr(C)] themselves since declaring it multiple times works fine, e.g. this works:

#[repr(C)]
#[repr(C)]
#[repr(C)]
pub struct Vertex { ...

Resolves #3790

Could we get a new gfx crate release with this in it please? I think this will help out any old-school users of this crate.

Fixes issues with rust 1.67 field ordering.
@alexheretic
Copy link
Contributor Author

Hey @kvark i know v0.18 is ancient these days, but this fix is quite valuable for anyone still using it with rust 1.67 (like me). I think it's worth making a 0.18.3 release with this. Wdyt?

@kvark
Copy link
Member

kvark commented Feb 24, 2023

@alexheretic sure, sounds good!

@kvark
Copy link
Member

kvark commented Feb 24, 2023

Would you mind bumping the version to 0.18.3 in the PR?

@alexheretic
Copy link
Contributor Author

Would you mind bumping the version to 0.18.3 in the PR?

✔️

@kvark kvark merged commit 13d3e6d into gfx-rs:v0.18 Feb 27, 2023
@kvark
Copy link
Member

kvark commented Feb 27, 2023

Published now. Thank you for support!

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.

2 participants