X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpulib%2Fgpu.h;h=64d2eec946cdc0a781912ea8c3ca9c4c336b38a4;hb=099bba58d42cf3c27e29ddaed15b1d53a9b469a7;hp=5ad2a46163c7e98c8de15724700011a326ddf404;hpb=e929dec505f8d3692248fe0d42c84a37c994ad39;p=pcsx_rearmed.git diff --git a/plugins/gpulib/gpu.h b/plugins/gpulib/gpu.h index 5ad2a461..64d2eec9 100644 --- a/plugins/gpulib/gpu.h +++ b/plugins/gpulib/gpu.h @@ -8,6 +8,9 @@ * See the COPYING file in the top-level directory. */ +#ifndef __GPULIB_GPU_H__ +#define __GPULIB_GPU_H__ + #include #ifdef __cplusplus @@ -17,10 +20,9 @@ extern "C" { #define CMD_BUFFER_LEN 1024 struct psx_gpu { - uint16_t vram[1024 * 512]; - uint16_t guard[1024 * 512]; // overdraw guard uint32_t cmd_buffer[CMD_BUFFER_LEN]; uint32_t regs[16]; + uint16_t *vram; union { uint32_t reg; struct { @@ -69,6 +71,8 @@ struct psx_gpu { uint32_t blanked:1; uint32_t enhancement_enable:1; uint32_t enhancement_active:1; + uint32_t downscale_enable:1; + uint32_t downscale_active:1; uint32_t *frame_count; uint32_t *hcnt; /* hsync count */ struct { @@ -89,7 +93,14 @@ struct psx_gpu { uint32_t last_flip_frame; uint32_t pending_fill[3]; } frameskip; - uint16_t *enhancement_bufer; + uint32_t scratch_ex_regs[8]; // for threaded rendering + int useDithering:1; /* 0 - off , 1 - on */ + uint16_t *(*get_enhancement_bufer) + (int *x, int *y, int *w, int *h, int *vram_h); + uint16_t *(*get_downscale_buffer) + (int *x, int *y, int *w, int *h, int *vram_h); + void *(*mmap)(unsigned int size); + void (*munmap)(void *ptr, unsigned int size); }; extern struct psx_gpu gpu; @@ -108,6 +119,8 @@ void renderer_flush_queues(void); void renderer_set_interlace(int enable, int is_odd); void renderer_set_config(const struct rearmed_cbs *config); void renderer_notify_res_change(void); +void renderer_notify_update_lace(int updated); +void renderer_sync(void); int vout_init(void); int vout_finish(void); @@ -137,3 +150,5 @@ void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_); #ifdef __cplusplus } #endif + +#endif /* __GPULIB_GPU_H__ */