SDL
SDL copied to clipboard
Add SDL_SIMDAllocAligned(len, align)
SDL_SIMDAlloc allocates aligned memory for SIMD operation. but sometimes you want memory with a different alignment. ( eg SDL_ttf uses aligned memory)
Maybe we should add SDL_SIMDAllocAligned(len, align)
This function was designed for SDL_ttf, which would have called this function had it existed, but since it didn't exist, hand-rolled it's own code that relies on the current implementation of SDL_SIMDAlloc(). We could add this function, but SDL_ttf can't use it, because it needs to be compatible with older versions of SDL which don't provide it.
I think for SDL 3.0 what we really want is a way to set the memory deallocation function on a surface and let people allocate surface memory however they want. I'm going to defer this for now instead of adding yet another function to the SDL API surface, if there aren't any other use cases that would benefit from this.
Updating to the 3.2.0 milestone so we can use it with SDL3_ttf.
the PR is https://github.com/libsdl-org/SDL/pull/5650
rebasing had some issue, so I created a new branch: https://github.com/libsdl-org/SDL/pull/6997