mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-28 00:33:02 +00:00
remove aarch64-specific logic, it has been moved to its own branch, "aarch64"
This commit is contained in:
parent
32c18e82ca
commit
a8944f36ec
3 changed files with 1 additions and 43 deletions
6
build.sh
6
build.sh
|
@ -38,7 +38,6 @@ MSYS_NT*|MINGW*) # MSYS2 on Windows
|
|||
else
|
||||
UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)"
|
||||
fi
|
||||
sed -i -e '/^#pragma weak /d' src/devices/ppu.c
|
||||
;;
|
||||
Darwin) # macOS
|
||||
CFLAGS="${CFLAGS} -Wno-typedef-redefinition"
|
||||
|
@ -57,14 +56,11 @@ then
|
|||
else
|
||||
CFLAGS="${CFLAGS} -DNDEBUG -Os -g0 -s"
|
||||
CORE='src/uxn-fast.c'
|
||||
ARCH=`${CC} -dumpmachine 2> /dev/null || echo nope`
|
||||
ARCH=${ARCH%%-*}
|
||||
EXTRA=`find src -name *_${ARCH}.c 2> /dev/null || true`
|
||||
fi
|
||||
|
||||
echo "Building.."
|
||||
${CC} ${CFLAGS} src/uxnasm.c -o bin/uxnasm
|
||||
${CC} ${CFLAGS} ${CORE} src/devices/file.c src/devices/mouse.c src/devices/ppu.c src/devices/apu.c src/uxnemu.c ${EXTRA} ${UXNEMU_LDFLAGS} -o bin/uxnemu
|
||||
${CC} ${CFLAGS} ${CORE} src/devices/file.c src/devices/mouse.c src/devices/ppu.c src/devices/apu.c src/uxnemu.c ${UXNEMU_LDFLAGS} -o bin/uxnemu
|
||||
${CC} ${CFLAGS} ${CORE} src/devices/file.c src/uxncli.c -o bin/uxncli
|
||||
|
||||
if [ -d "$HOME/bin" ]
|
||||
|
|
|
@ -77,7 +77,6 @@ ppu_clear(Ppu *p, Layer *layer)
|
|||
layer->changed = 1;
|
||||
}
|
||||
|
||||
#pragma weak ppu_redraw
|
||||
void
|
||||
ppu_redraw(Ppu *p, Uint32 *screen)
|
||||
{
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
#ifdef __aarch64__
|
||||
#include <arm_neon.h>
|
||||
#include "ppu.h"
|
||||
|
||||
void
|
||||
ppu_redraw(Ppu *p, Uint32 *screen)
|
||||
{
|
||||
uint8x16x4_t pal = vld4q_u8((Uint8*)p->palette);
|
||||
Uint8 *fg = p->fg.pixels;
|
||||
Uint8 *bg = p->bg.pixels;
|
||||
int i;
|
||||
|
||||
p->fg.changed = p->bg.changed = 0;
|
||||
|
||||
#ifdef __has_builtin
|
||||
#if __has_builtin(__builtin_assume)
|
||||
__builtin_assume(p->width > 0 && p->height > 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
for(i = 0; i < (p->width * p->height & ~15); i += 16, fg += 16, bg += 16, screen += 16) {
|
||||
uint8x16_t fg8 = vld1q_u8(fg);
|
||||
uint8x16_t bg8 = vld1q_u8(bg);
|
||||
uint8x16_t px8 = vbslq_u8(vceqzq_u8(fg8), bg8, fg8);
|
||||
uint8x16x4_t px = {
|
||||
vqtbl1q_u8(pal.val[0], px8),
|
||||
vqtbl1q_u8(pal.val[1], px8),
|
||||
vqtbl1q_u8(pal.val[2], px8),
|
||||
vdupq_n_u8(0xff),
|
||||
};
|
||||
vst4q_u8((uint8_t*)screen, px);
|
||||
}
|
||||
|
||||
for(; i < p->width * p->height; i++)
|
||||
screen[i] = p->palette[*fg ? *fg : *bg];
|
||||
}
|
||||
#endif
|
Loading…
Reference in a new issue