aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2011-12-19 23:29:42 +0200
committernotaz2011-12-19 23:29:42 +0200
commit9a6e78167b192106ed58bfac00e82f4c6caa2586 (patch)
tree04234e6c0213f28796de8e9eff542fbd1b3579b3
parent59f1c85c77cb3e598f317409142599ba92e23d91 (diff)
downloadpcsx_rearmed-9a6e78167b192106ed58bfac00e82f4c6caa2586.tar.gz
pcsx_rearmed-9a6e78167b192106ed58bfac00e82f4c6caa2586.tar.bz2
pcsx_rearmed-9a6e78167b192106ed58bfac00e82f4c6caa2586.zip
gpu_neon: fix test mode of unai renderer
-rw-r--r--plugins/gpu_neon/Makefile.test2
-rw-r--r--plugins/gpu_neon/peops_if.c4
-rw-r--r--plugins/gpu_neon/unai_if.cpp16
3 files changed, 20 insertions, 2 deletions
diff --git a/plugins/gpu_neon/Makefile.test b/plugins/gpu_neon/Makefile.test
index 952f508..5ca8d18 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 a492f3a..48fd431 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 488d26c..67e045d 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