-
Notifications
You must be signed in to change notification settings - Fork 51
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
MTLResourceID
should expose _impl
#660
Comments
I believe our generation is correct here in hiding the field, that's also what Apple's docs show. But the again, Swift's generation still allows constructing it with the private name. I suspect that's a bug in Swift's generation though, private fields seems like a fairly rare case, I only found three in our currently generated files? Anyhow, I'm fine with exposing
I don't actually know if that's correct, haven't used this API myself and not too familiar with Metal, what do you think? |
I think so too, there are some apple provided libraries though that access the field directly. (Metal Shader Converter), which is why we need it in our saxaboom crate.
I don't mind marking from_raw as unsafe, and I've done similar for similar constructs in our engine. |
Does what it says on the tin, same as on `gpu-allocator` It would be nice to have madsmtm/objc2#660 address tho, but it's not strictly required for now since it requires spinning a new release and I don't think we have to wait that long for this to get merged. --------- Co-authored-by: Marijn Suijten <marijn@traverseresearch.nl>
@madsmtm for completeness Apple "exposes" and "uses" it here in their IRConverter runtime headers: |
For FFI reasons its often useful to be able to get access to the raw value, at the moment I'm just transmuting the struct back and forth but nicer would be to have a
to_raw() -> u64
The text was updated successfully, but these errors were encountered: