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
Hello, I get the following errors when running my app with MoltenVK on iOS arm64 simulator (Apple M1 chips):
-[MTLDebugRenderCommandEncoder validateCommonDrawErrors:], line 5326: error 'Draw Errors Validation
Vertex Function(VS_Entry_lusion): the offset into the buffer _9 that is bound at buffer index 0 must be a multiple of 256 but was set to 384.
'
-[MTLDebugRenderCommandEncoder validateCommonDrawErrors:], line 5326: error 'Draw Errors Validation
Vertex Function(VS_Entry_lusion): the offset into the buffer _9 that is bound at buffer index 0 must be a multiple of 256 but was set to 262336.
'
-[MTLDebugRenderCommandEncoder validateCommonDrawErrors:], line 5326: error 'Draw Errors Validation
Vertex Function(VS_Entry_lusion): the offset into the buffer _9 that is bound at buffer index 0 must be a multiple of 256 but was set to 262528.
'
-[MTLDebugRenderCommandEncoder validateCommonDrawErrors:], line 5326: error 'Draw Errors Validation
Vertex Function(VS_Entry_lusion): the offset into the buffer _9 that is bound at buffer index 0 must be a multiple of 256 but was set to 192.
I've noticed that someone has encountered this problem: #1250
And MoltenVK Release note 2021/02/22 said:
Set Metal buffer alignment to 256 on non-Apple Silicon iOS/tvOS simulators.
But why Apple Silicon iOS simulators do not use alignment as 256 ?
When you set arguments for the render or compute command, align constant buffer offsets to 256 bytes. Normally, iOS requires an alignment of 4 bytes. This difference may mean that you might need to arrange your data differently when running in Simulator.
And if I was wrong, how can I resolve these errors?
Do I need to define any macros to tell MoltenVK the target is arm64 simulator ?
Thanks in advance !
The text was updated successfully, but these errors were encountered:
LeavesInAutumn
changed the title
Metal buffer alignment
Metal buffer alignment is not 256 on Apple M1 chips arm64 simulator
Aug 9, 2023
LeavesInAutumn
changed the title
Metal buffer alignment is not 256 on Apple M1 chips arm64 simulator
Metal buffer alignment is not 256 on iOS arm64 simulator
Aug 9, 2023
Hello, I get the following errors when running my app with MoltenVK on iOS arm64 simulator (Apple M1 chips):
I've noticed that someone has encountered this problem: #1250
And MoltenVK Release note 2021/02/22 said:
But why Apple Silicon iOS simulators do not use alignment as 256 ?
I guess we should always use alignment as 256 on all simulators according to the Apple official documents: https://developer.apple.com/documentation/metal/developing_metal_apps_that_run_in_simulator?language=objc
And if I was wrong, how can I resolve these errors?
Do I need to define any macros to tell MoltenVK the target is arm64 simulator ?
Thanks in advance !
The text was updated successfully, but these errors were encountered: