-
Notifications
You must be signed in to change notification settings - Fork 190
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
get_physical_device_memory_properties
return invalid heap_index
#920
Comments
Let us first link some relevant sources: The PR that made this The bit of code that you're bringing up for discussion: Lines 440 to 452 in 331724c
Also relevant to mention that the "545.29.06 driver" you're mentioning is an Nvidia driver. Other hardware vendors, which also implement the Vulkan API, have a different numbering scheme. Have you looked at the Specifically we added slice getters in #858 to make it easier to extract the valid portion of this struct. |
Now, given that the fields of |
https://doc.rust-lang.org/std/pin/struct.Pin.html#method.get_unchecked_mut might be a nice example of this, where the safety docs don't specify any preconditions to uphold, but do say how you have to handle the returned value to not cause any UB. On the other hand the safety docs for Maybe this is one of the few cases where we should move back to |
Thanks for answering You are right I didn't check As it is my bad I guess issue is resolved |
See issue ash-rs/ash#920 Also reintroduce redraw event in cube example
I don't want to close this prematurely as there's definitely something actionable on the Ash side, even if the Vulkan specification specifically calls out that the In the case that Otherwise, we could move back to Finally, we could wrap this struct in such a way that the fields are not exposed, and that the user can only access a slice view through a helper (also without being able to update/overwrite the That would go nicely with changing the sized array type (because it now has a All of the above applies to a few more functions that return |
I started to inventorize all static-sized arrays that are runtime length bounded (either by a field or for strings a NULL terminator) at https://github.com/ash-rs/ash/compare/static-runtime-bounded-array-maybeuninit. Might get a little nasty to deal with this properly, as all accessor functions now have to be (either by overwriting the count field or rewriting when/where the NULL terminator is) And since there isn't always a "guarantee" that (parts of) the struct was uninitialized (or left uninitialized), specifically when the caller passes a |
See issue ash-rs/ash#920
See issue ash-rs/ash#920 Also reintroduce redraw event in cube example
In ash 0.38 memory for
VkPhysicalDeviceMemoryProperties
became uninitializedlet mut memory_prop = mem::MaybeUninit::uninit();
This change produce invalid data in (at least)
memory_types
field (specifically heap_index becomes random) which violates restrictions inVkMemoryType
As for ash 0.37 it is fine as memory is zeroed
let mut memory_prop = mem::zeroed();
Driver 545.29.06-0ubuntu0.22.04.2
The text was updated successfully, but these errors were encountered: