-
Notifications
You must be signed in to change notification settings - Fork 13
Remove assert for memory alignment #120
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
base: main
Are you sure you want to change the base?
Conversation
This assert is not useful -- the size returned by the implementation is not supposed to be aligned. The alignment is for sub-allocating resources within a device memory allocation. In addition, allocations of memory from vkAllocateMemory are guaranteed to be aligned to the largest memory alignment requirement. Fixes KhronosGroup#51.
|
can you please @zlatinski give your feedback on this assert ? what was the initial idea on having it ? |
|
Can you backport this patch from NVPro as it is more complete ? |
@zlatinski, I'm not sure why |
|
Please see 1a45c233e5461a39a2b09189d62f12a2370e313f from NVPRO samples. |
@zlatinski, in that change you align |
This is per the API specifying the alignment within the memoryRequirements.alignment, which is usually coming from vkGetBufferMemoryRequirements(device, buffer, &memoryRequirements). |
The AFAIK (and confirmed with validation layers) there is no requirement for the allocation size to the aligned to |
This assert is not useful -- the size returned by the implementation is not supposed to be aligned. The alignment is for sub-allocating resources within a device memory allocation. In addition, allocations of memory from vkAllocateMemory are guaranteed to be aligned to the largest memory alignment requirement.
Fixes #51.