You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to allocate a uniform buffer, vkGetBufferMemoryRequirements returns the alignment as 64 bytes. This leads to the following assert from the metal API validation: validateFunctionArguments:3722: failed assertion 'Fragment Function(main0): the offset into the buffer _23 that is bound at buffer index 0 must be a multiple of 256 but was set to 24960.'
When running in the iOS simulator, constant buffer offsets must be
aligned to 256 bytes. `vkGetBufferMemoryRequirements` is reporting the
wrong alignement in this case. see: KhronosGroup/MoltenVK#1250
When running in the iOS/tvOS simulator, constant buffer offsets must be
aligned to 256 bytes. `vkGetBufferMemoryRequirements` is reporting the
wrong alignement in this case. see: KhronosGroup/MoltenVK#1250
georged-youi
pushed a commit
to YOU-i-Labs/VulkanMemoryAllocator
that referenced
this issue
Feb 10, 2021
When running in the iOS/tvOS simulator, constant buffer offsets must be
aligned to 256 bytes. `vkGetBufferMemoryRequirements` is reporting the
wrong alignement in this case. see: KhronosGroup/MoltenVK#1250
When running a Metal app in the iOS simulator, Apple requires that align constant buffer offsets for render commands to be 256 bytes. (see: https://developer.apple.com/documentation/metal/developing_metal_apps_that_run_in_simulator?language=objc)
Trying to allocate a uniform buffer,
vkGetBufferMemoryRequirements
returns the alignment as 64 bytes. This leads to the following assert from themetal API validation
:validateFunctionArguments:3722: failed assertion 'Fragment Function(main0): the offset into the buffer _23 that is bound at buffer index 0 must be a multiple of 256 but was set to 24960.'
The issue seems to be coming from this file: https://github.com/KhronosGroup/MoltenVK/blob/05066429e29cb5bf11d21cb2bc2b5ebfff94e7ae/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm where
mtlBufferAlignment
is set to 256 only forMVK_MACOS
, but there's no check for the iOS simulator.The text was updated successfully, but these errors were encountered: