aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu_neon
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gpu_neon')
-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