2 * (C) GraÅžvydas "notaz" Ignotas, 2011
4 * This work is licensed under the terms of any of these licenses
6 * - GNU GPL, version 2 or later.
7 * - GNU LGPL, version 2.1 or later.
8 * See the COPYING file in the top-level directory.
14 #include "psx_gpu/psx_gpu.c"
16 #define printf xprintf
18 #include "psx_gpu/psx_gpu_standard.c"
20 #include "psx_gpu/psx_gpu_parse.c"
23 static psx_gpu_struct egpu __attribute__((aligned(256)));
25 void do_cmd_list(uint32_t *list, int count)
27 gpu_parse(&egpu, list, count * 4);
30 int renderer_init(void)
32 initialize_psx_gpu(&egpu, gpu.vram);
36 void renderer_sync_ecmds(uint32_t *ecmds)
38 gpu_parse(&egpu, ecmds + 1, 6 * 4);
41 void renderer_invalidate_caches(int x, int y, int w, int h)
43 invalidate_texture_cache_region(&egpu, x, y, x + w - 1, y + h - 1);
46 void renderer_flush_queues(void)
48 flush_render_block_buffer(&egpu);
51 void renderer_set_interlace(int enable, int is_odd)
53 egpu.interlace_mode &= ~(RENDER_INTERLACE_ENABLED|RENDER_INTERLACE_ODD);
55 egpu.interlace_mode |= RENDER_INTERLACE_ENABLED;
57 egpu.interlace_mode |= RENDER_INTERLACE_ODD;
60 void renderer_set_config(const struct rearmed_cbs *cbs)