X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fpsx_gpu_if.c;fp=plugins%2Fgpu_neon%2Fpsx_gpu_if.c;h=8907ac02821ea68a653c5e8a1525653ded9dc455;hp=0000000000000000000000000000000000000000;hb=90ca49139cdc64ab374f2e763cb4c28fffd0a7b8;hpb=85e76515640941eccafc0ed086d7bbf5a8fe0400 diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c new file mode 100644 index 00000000..8907ac02 --- /dev/null +++ b/plugins/gpu_neon/psx_gpu_if.c @@ -0,0 +1,53 @@ +/* + * (C) Gražvydas "notaz" Ignotas, 2011 + * + * This work is licensed under the terms of any of these licenses + * (at your option): + * - GNU GPL, version 2 or later. + * - GNU LGPL, version 2.1 or later. + * See the COPYING file in the top-level directory. + */ + +#include + +#if 1 +#include "psx_gpu/psx_gpu.c" +#else +#define printf xprintf +#define xprintf(...) +#include "psx_gpu/psx_gpu_standard.c" +#endif +#include "psx_gpu/psx_gpu_parse.c" +#include "gpu.h" + +static psx_gpu_struct egpu __attribute__((aligned(256))); + +void do_cmd_list(uint32_t *list, int count) +{ + gpu_parse(&egpu, list, count * 4); +} + +int renderer_init(void) +{ + initialize_psx_gpu(&egpu, gpu.vram); + return 0; +} + +void renderer_sync_ecmds(uint32_t *ecmds) +{ + gpu_parse(&egpu, ecmds + 1, 6 * 4); +} + +void renderer_invalidate_caches(int x, int y, int w, int h) +{ + invalidate_texture_cache_region(&egpu, x, y, x + w - 1, y + h - 1); +} + +void renderer_flush_queues(void) +{ + flush_render_block_buffer(&egpu); +} + +void renderer_set_config(const struct rearmed_cbs *cbs) +{ +}