[common] add runtime detection and selection of AVX/AVX2 support

This commit is contained in:
Geoffrey McRae
2023-11-19 02:52:11 +11:00
parent 5d4c1d348c
commit 3330f83af6
6 changed files with 245 additions and 14 deletions

View File

@@ -27,18 +27,8 @@
#include "common/framebuffer.h"
#include "common/types.h"
inline static void rectCopyUnaligned(uint8_t * dst, const uint8_t * src,
int ystart, int yend, int dx, int dstPitch, int srcPitch, int width)
{
src += ystart * srcPitch + dx;
dst += ystart * dstPitch + dx;
for (int i = ystart; i < yend; ++i)
{
memcpy(dst, src, width);
src += srcPitch;
dst += dstPitch;
}
}
extern void (*rectCopyUnaligned)(uint8_t * dst, const uint8_t * src,
int ystart, int yend, int dx, int dstPitch, int srcPitch, int width);
void rectsBufferToFramebuffer(FrameDamageRect * rects, int count, int bpp,
FrameBuffer * frame, int dstPitch, int height,