(GX) fix asm blitter in optimized builds

This commit is contained in:
Toad King 2012-08-10 14:48:56 -04:00
parent e3e3e1f3bc
commit 545b530a50

View File

@ -235,10 +235,11 @@ static void gx_start(void)
g_vsync = true; g_vsync = true;
} }
#if 0 #define ASM_BLITTER
// TODO: Fix
static void update_texture_asm(const uint32_t *src, #ifdef ASM_BLITTER
static __attribute__ ((noinline)) void update_texture_asm(const uint32_t *src,
unsigned width, unsigned height, unsigned pitch) unsigned width, unsigned height, unsigned pitch)
{ {
register uint32_t tmp0, tmp1, tmp2, tmp3, line2, line2b, line3, line3b, line4, line4b, line5; register uint32_t tmp0, tmp1, tmp2, tmp3, line2, line2b, line3, line3b, line4, line4b, line5;
@ -357,8 +358,8 @@ static void update_texture(const uint32_t *src,
unsigned width, unsigned height, unsigned pitch) unsigned width, unsigned height, unsigned pitch)
{ {
gx_video_t *gx = (gx_video_t*)driver.video_data; gx_video_t *gx = (gx_video_t*)driver.video_data;
#if 0 #ifdef ASM_BLITTER
if (!(width & 3) && !(height & 3)) if (width && height && !(width & 3) && !(height & 3))
{ {
update_texture_asm(src, width, height, pitch); update_texture_asm(src, width, height, pitch);
} }
@ -382,7 +383,6 @@ static void update_texture(const uint32_t *src,
} }
} }
// TODO: only convert when menu is visible
if(gx->menu_render) if(gx->menu_render)
{ {
uint16_t *block = (uint16_t *) menu_tex.data; uint16_t *block = (uint16_t *) menu_tex.data;