Repository navigation
Conversation
OoT leaves attachment-less draws at 32768x32768; Apple GPUs max out at 16384 and Metal loses the device after the intro. Also pad the stream buffer by 64 KiB so Metal cbuf reads near the end stay in bounds. Assisted-by: Cursor (ported Lichii#427 / diagnosed crash)
|
Retargeted to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On macOS/MoltenVK, Ocarina of Time crashed after the intro with
Lost VkDevice/Internal Error. Attachment-less draws used a 32768x32768 framebuffer from thesurface clip; Apple GPUs only allow 16384. This clamps framebuffer width/height/layers
to the device limits, and pads the Vulkan stream buffer by 64 KiB so Metal constant-buffer
reads near the end stay in bounds.
Ported from Lichii#427 / diagnosis in Lichii#237.
Assisted-by: Cursor (ported Lichii#427 / diagnosed crash)
Type of change
Related issues
Related to #732
Based on zortos293/Lichii#427
Testing
Games tested:
The Legend of Zelda: Ocarina of Time (0400486024DEC000) on Apple M2 Pro / MoltenVK:
no longer crashes after the intro into 3D. FPS still low (~5), expected on current macOS.
Checklist
Screenshots / logs
Before: abort with
VK_ERROR_OUT_OF_DEVICE_MEMORY: Lost VkDevice ... Internal Error (0000010c)after the intro.
After: reaches 3D gameplay without device loss.