diff options
Diffstat (limited to 'libpixelflinger/scanline.cpp')
-rw-r--r-- | libpixelflinger/scanline.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp index aa23ca6..26b9a3e 100644 --- a/libpixelflinger/scanline.cpp +++ b/libpixelflinger/scanline.cpp @@ -26,6 +26,10 @@ #include <cutils/memory.h> #include <cutils/log.h> +#ifdef __arm__ +#include <machine/cpu-features.h> +#endif + #include "buffer.h" #include "scanline.h" @@ -35,7 +39,7 @@ #include "codeflinger/ARMAssembler.h" #elif defined(__aarch64__) #include "codeflinger/Arm64Assembler.h" -#elif defined(__mips__) +#elif defined(__mips__) && !defined(__LP64__) #include "codeflinger/MIPSAssembler.h" #endif //#include "codeflinger/ARMAssemblerOptimizer.h" @@ -55,7 +59,7 @@ # define ANDROID_CODEGEN ANDROID_CODEGEN_GENERATED #endif -#if defined(__arm__) || defined(__mips__) || defined(__aarch64__) +#if defined(__arm__) || (defined(__mips__) && !defined(__LP64__)) || defined(__aarch64__) # define ANDROID_ARM_CODEGEN 1 #else # define ANDROID_ARM_CODEGEN 0 @@ -69,7 +73,7 @@ */ #define DEBUG_NEEDS 0 -#ifdef __mips__ +#if defined( __mips__) && !defined(__LP64__) #define ASSEMBLY_SCRATCH_SIZE 4096 #elif defined(__aarch64__) #define ASSEMBLY_SCRATCH_SIZE 8192 @@ -130,7 +134,7 @@ extern "C" void scanline_col32cb16blend_arm(uint16_t *dst, uint32_t col, size_t #elif defined(__aarch64__) extern "C" void scanline_t32cb16blend_arm64(uint16_t*, uint32_t*, size_t); extern "C" void scanline_col32cb16blend_arm64(uint16_t *dst, uint32_t col, size_t ct); -#elif defined(__mips__) +#elif defined(__mips__) && !defined(__LP64__) extern "C" void scanline_t32cb16blend_mips(uint16_t*, uint32_t*, size_t); #endif @@ -408,10 +412,10 @@ static void pick_scanline(context_t* c) GGLAssembler assembler( new ArmToArm64Assembler(a) ); #endif // generate the scanline code for the given needs - int err = assembler.scanline(c->state.needs, c); + bool err = assembler.scanline(c->state.needs, c) != 0; if (ggl_likely(!err)) { // finally, cache this assembly - err = gCodeCache.cache(a->key(), a); + err = gCodeCache.cache(a->key(), a) < 0; } if (ggl_unlikely(err)) { ALOGE("error generating or caching assembly. Reverting to NOP."); @@ -534,7 +538,7 @@ static inline int blendfactor(uint32_t x, uint32_t size, uint32_t def = 0) return x; } -void blend_factor(context_t* c, pixel_t* r, +void blend_factor(context_t* /*c*/, pixel_t* r, uint32_t factor, const pixel_t* src, const pixel_t* dst) { switch (factor) { @@ -1161,7 +1165,7 @@ protected: * blender.blend(<32-bit-src-pixel-value>,<ptr-to-16-bit-dest-pixel>) */ struct blender_32to16 { - blender_32to16(context_t* c) { } + blender_32to16(context_t* /*c*/) { } void write(uint32_t s, uint16_t* dst) { if (s == 0) return; @@ -1218,7 +1222,7 @@ struct blender_32to16 { * where dstFactor=srcA*(1-srcA) srcFactor=srcA */ struct blender_32to16_srcA { - blender_32to16_srcA(const context_t* c) { } + blender_32to16_srcA(const context_t* /*c*/) { } void write(uint32_t s, uint16_t* dst) { if (!s) { return; @@ -2171,7 +2175,7 @@ last_one: void scanline_t32cb16blend(context_t* c) { -#if ((ANDROID_CODEGEN >= ANDROID_CODEGEN_ASM) && (defined(__arm__) || defined(__mips__) || defined(__aarch64__))) +#if ((ANDROID_CODEGEN >= ANDROID_CODEGEN_ASM) && (defined(__arm__) || (defined(__mips__) && !defined(__LP64__)) || defined(__aarch64__))) int32_t x = c->iterators.xl; size_t ct = c->iterators.xr - x; int32_t y = c->iterators.y; @@ -2317,7 +2321,7 @@ void scanline_set(context_t* c) memset(dst, 0xFF, size); } -void scanline_noop(context_t* c) +void scanline_noop(context_t* /*c*/) { } |