I also have a suspicion that we may need to use kIOSurfaceAllocSize in MacIOSurface::CreateIOSurface to enforce a SIMD unit of slop at the end of the buffer, which SWGL currently relies upon for masking off partial stores quickly. The data in that case just gets read and written back out withiout modification, but this can cause traps if there's not space allocated. This usually only causes a problem on the last row of an image. That could be the source of some small amount of crashiness. Though possibly if coordinates are being wrongly flipped and things being improperly accessed, that might also be a source of crashes, or both... For future ref: https://developer.apple.com/documentation/iosurface/iosurface_constants
Bug 1647946 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I also have a suspicion that we may need to use kIOSurfaceAllocSize in MacIOSurface::CreateIOSurface to enforce a SIMD unit of slop at the end of the buffer, which SWGL currently relies upon for masking off partial stores quickly. The data in that case just gets read and written back out without modification (masked to fall within the valid range of a span), but this can cause traps if there's not space allocated. This usually only causes a problem on the last row of an image. That could be the source of some small amount of crashiness. Though possibly if coordinates are being wrongly flipped and things being improperly accessed, that might also be a source of crashes, or both... For future ref: https://developer.apple.com/documentation/iosurface/iosurface_constants