Ensure Xcode simulator always uses 256B buffer alignment.

Xcode simulator always requires 256B buffer alignment, even when running
on Apple Silicon. Previously, it was assumed that Apple Silicon would use
it's native 16B buffer alignment.
This commit is contained in:
Bill Hollings 2023-08-13 20:14:20 -04:00
parent 7cb6096321
commit 41a5a97fef
2 changed files with 5 additions and 4 deletions

View File

@ -28,9 +28,10 @@ Released TBD
- Add support for `VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN`. - Add support for `VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN`.
- Support building MoltenVK for visionOS. - Support building MoltenVK for visionOS.
- Ensure non-dispatch compute commands don't interfere with compute encoding state used by dispatch commands. - Ensure non-dispatch compute commands don't interfere with compute encoding state used by dispatch commands.
- Support `VK_PRESENT_MODE_IMMEDIATE_KHR` if `VkPresentTimeGOOGLE::desiredPresentTime` is zero.
- Support maximizing the concurrent executing compilation tasks via `MVKConfiguration::shouldMaximizeConcurrentCompilation` - Support maximizing the concurrent executing compilation tasks via `MVKConfiguration::shouldMaximizeConcurrentCompilation`
- Support `VK_PRESENT_MODE_IMMEDIATE_KHR` if `VkPresentTimeGOOGLE::desiredPresentTime` is zero.
- Add support for `VK_PRESENT_MODE_IMMEDIATE_KHR` to macOS Cube demo. - Add support for `VK_PRESENT_MODE_IMMEDIATE_KHR` to macOS Cube demo.
- Ensure Xcode simulator always uses 256B buffer alignment.
- Log more info about SPIR-V to MSL conversion errors. - Log more info about SPIR-V to MSL conversion errors.
- Drop official support for using *Xcode 11* to build MoltenVK. - Drop official support for using *Xcode 11* to build MoltenVK.

View File

@ -2157,9 +2157,9 @@ void MVKPhysicalDevice::initMetalFeatures() {
#endif #endif
} }
// iOS and tvOS adjustments necessary when running in the simulator on non-Apple GPUs. // iOS and tvOS adjustments necessary when running on the simulator.
#if MVK_OS_SIMULATOR && !MVK_APPLE_SILICON #if MVK_OS_SIMULATOR
_metalFeatures.mtlBufferAlignment = 256; _metalFeatures.mtlBufferAlignment = 256; // Even on Apple Silicon
#endif #endif
// Currently, Metal argument buffer support is in beta stage, and is only supported // Currently, Metal argument buffer support is in beta stage, and is only supported