-
Notifications
You must be signed in to change notification settings - Fork 250
push constants with a single type don't work #361
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
Comments
Did you try #[repr(C)]? Yes, Rust will convert single and double field structs to scalar and scalar pairs. |
If you add error: Cannot cast between pointer types
--> src/lib.rs:17:22
|
17 | let _constants = constants.load();
| ^^^^^^^^^^^^^^^^
|
= note: from: *{Function} struct ShaderConstants { time: f32 }
= note: to: *{Function} u32 |
I think this is a duplicate of #362 since you mention using Vulkan, and the original error is the same as what's mentioned there. |
Copying in some discussion from discord, the reason it goes from |
Reported #373 for the failure about casting to u32, which is unrelated |
The following 3 tests all fail:
I think it's alright for the 3rd one to fail, using
PushConstants
with primitives seems a little dodgy to me, but it'd be nice to fix either test 1 or 2.The text was updated successfully, but these errors were encountered: