mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-14 19:38:10 +00:00
[common] add runtime detection and selection of AVX/AVX2 support
This commit is contained in:
@@ -29,4 +29,19 @@ bool cpuInfo_get(char * model, size_t modelSize, int * procs, int * cores,
|
||||
|
||||
void cpuInfo_log(void);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool sse, sse2, sse3, ssse3;
|
||||
bool fma;
|
||||
bool sse4_1, sse4_2;
|
||||
bool popcnt;
|
||||
bool aes;
|
||||
bool xsave, osxsave;
|
||||
bool avx, avx2;
|
||||
bool bmi1, bmi2;
|
||||
}
|
||||
CPUInfoFeatures;
|
||||
|
||||
const CPUInfoFeatures * cpuInfo_getFeatures(void);
|
||||
|
||||
#endif
|
||||
|
@@ -70,7 +70,8 @@ void framebuffer_prepare(FrameBuffer * frame);
|
||||
/**
|
||||
* Write data from the src buffer into the KVMFRFrame
|
||||
*/
|
||||
bool framebuffer_write(FrameBuffer * frame, const void * src, size_t size);
|
||||
extern bool (*framebuffer_write)(FrameBuffer * frame,
|
||||
const void * restrict src, size_t size);
|
||||
|
||||
/**
|
||||
* Gets the underlying data buffer of the framebuffer.
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user