Merge pull request #1993 from billhollings/fix-sim-buff-align

Ensure Xcode simulator always uses 256B buffer alignment.
This commit is contained in:
Bill Hollings 2023-08-14 10:11:34 -04:00 committed by GitHub
commit 47840b9beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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`.
- Support building MoltenVK for visionOS.
- 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 `VK_PRESENT_MODE_IMMEDIATE_KHR` if `VkPresentTimeGOOGLE::desiredPresentTime` is zero.
- 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.
- Drop official support for using *Xcode 11* to build MoltenVK.

View File

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