From: notaz Date: Mon, 19 Dec 2011 21:29:42 +0000 (+0200) Subject: gpu_neon: fix test mode of unai renderer X-Git-Tag: r12~18 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a6e78167b192106ed58bfac00e82f4c6caa2586;p=pcsx_rearmed.git gpu_neon: fix test mode of unai renderer --- diff --git a/plugins/gpu_neon/Makefile.test b/plugins/gpu_neon/Makefile.test index 952f5088..5ca8d18a 100644 --- a/plugins/gpu_neon/Makefile.test +++ b/plugins/gpu_neon/Makefile.test @@ -4,7 +4,7 @@ CC_ = $(CROSS_COMPILE)gcc ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}') -CFLAGS += -ggdb -Wall +CFLAGS += -ggdb -Wall -DTEST CFLAGS += -O2 ifeq "$(ARCH)" "arm" CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp diff --git a/plugins/gpu_neon/peops_if.c b/plugins/gpu_neon/peops_if.c index a492f3a9..48fd431b 100644 --- a/plugins/gpu_neon/peops_if.c +++ b/plugins/gpu_neon/peops_if.c @@ -304,7 +304,6 @@ void do_cmd_list(unsigned int *list, int list_len) for (; list < list_end; list += 1 + len) { - short *slist = (void *)list; cmd = *list >> 24; len = cmd_lengths[cmd]; @@ -352,8 +351,10 @@ void do_cmd_list(unsigned int *list, int list_len) break; } +#ifdef TEST case 0xA0: // sys -> vid { + short *slist = (void *)list; u32 load_width = slist[4]; u32 load_height = slist[5]; u32 load_size = load_width * load_height; @@ -361,6 +362,7 @@ void do_cmd_list(unsigned int *list, int list_len) len += load_size / 2; break; } +#endif } } } diff --git a/plugins/gpu_neon/unai_if.cpp b/plugins/gpu_neon/unai_if.cpp index 488d26c2..67e045d1 100644 --- a/plugins/gpu_neon/unai_if.cpp +++ b/plugins/gpu_neon/unai_if.cpp @@ -231,6 +231,18 @@ void do_cmd_list(unsigned int *list, int list_len) break; } +#ifdef TEST + case 0xA0: // sys -> vid + { + u32 load_width = list[2] & 0xffff; + u32 load_height = list[2] >> 16; + u32 load_size = load_width * load_height; + + len += load_size / 2; + break; + } +#endif + default: unai_do_prim(cmd, list, len + 1); break; @@ -256,6 +268,8 @@ void renderer_flush_queues(void) { } +#ifndef TEST + #include "../../frontend/plugin_lib.h" void renderer_set_config(const struct rearmed_cbs *cbs) @@ -264,3 +278,5 @@ void renderer_set_config(const struct rearmed_cbs *cbs) light = !cbs->gpu_unai.no_light; blend = !cbs->gpu_unai.no_blend; } + +#endif