diff options
author | notaz | 2012-02-24 01:07:33 +0200 |
---|---|---|
committer | notaz | 2012-02-27 00:27:46 +0200 |
commit | b243416b907e6ce366b051e77ed8a434f7668d5d (patch) | |
tree | 0d1bce54ae1c19934c83f9546257de94723bd76e /plugins/gpu_neon/psx_gpu_if.c | |
parent | f7be0e2b7adc4f6c4057f44f789bd7405844701c (diff) | |
download | pcsx_rearmed-b243416b907e6ce366b051e77ed8a434f7668d5d.tar.gz pcsx_rearmed-b243416b907e6ce366b051e77ed8a434f7668d5d.tar.bz2 pcsx_rearmed-b243416b907e6ce366b051e77ed8a434f7668d5d.zip |
gpulib: eliminate list scan-ahead
Diffstat (limited to 'plugins/gpu_neon/psx_gpu_if.c')
-rw-r--r-- | plugins/gpu_neon/psx_gpu_if.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c index 3ff6e48..ff31c27 100644 --- a/plugins/gpu_neon/psx_gpu_if.c +++ b/plugins/gpu_neon/psx_gpu_if.c @@ -13,26 +13,37 @@ extern const unsigned char cmd_lengths[256]; #define command_lengths cmd_lengths +static unsigned int *ex_regs; + +#define PCSX +#define SET_Ex(r, v) \ + ex_regs[r] = v + #include "psx_gpu/psx_gpu.c" #include "psx_gpu/psx_gpu_parse.c" #include "../gpulib/gpu.h" static psx_gpu_struct egpu __attribute__((aligned(256))); -void do_cmd_list(uint32_t *list, int count) +int do_cmd_list(uint32_t *list, int count, int *last_cmd) { - gpu_parse(&egpu, list, count * 4); + int ret = gpu_parse(&egpu, list, count * 4, (u32 *)last_cmd); + + ex_regs[1] &= ~0x1ff; + ex_regs[1] |= egpu.texture_settings & 0x1ff; + return ret; } int renderer_init(void) { initialize_psx_gpu(&egpu, gpu.vram); + ex_regs = gpu.ex_regs; return 0; } void renderer_sync_ecmds(uint32_t *ecmds) { - gpu_parse(&egpu, ecmds + 1, 6 * 4); + gpu_parse(&egpu, ecmds + 1, 6 * 4, NULL); } void renderer_update_caches(int x, int y, int w, int h) |