From 7a20a6d03b86989f57b4ef2bb49dc3b4a36f41f1 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 5 Sep 2023 02:03:23 +0300 Subject: [PATCH] gpulib: new debug compile option for raw fb display --- plugins/gpulib/gpu.c | 2 ++ plugins/gpulib/gpu.h | 2 ++ plugins/gpulib/vout_pl.c | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c index d70e3663..73abe8f5 100644 --- a/plugins/gpulib/gpu.c +++ b/plugins/gpulib/gpu.c @@ -835,6 +835,7 @@ void GPUupdateLace(void) flush_cmd_buffer(); renderer_flush_queues(); +#ifndef RAW_FB_DISPLAY if (gpu.status & PSX_GPU_STATUS_BLANKING) { if (!gpu.state.blanked) { vout_blank(); @@ -848,6 +849,7 @@ void GPUupdateLace(void) if (!gpu.state.fb_dirty) return; +#endif if (gpu.frameskip.set) { if (!gpu.frameskip.frame_ready) { diff --git a/plugins/gpulib/gpu.h b/plugins/gpulib/gpu.h index cf627344..fa45825e 100644 --- a/plugins/gpulib/gpu.h +++ b/plugins/gpulib/gpu.h @@ -13,6 +13,8 @@ #include +//#define RAW_FB_DISPLAY + #define gpu_log(fmt, ...) \ printf("%d:%03d: " fmt, *gpu.state.frame_count, *gpu.state.hcnt, ##__VA_ARGS__) diff --git a/plugins/gpulib/vout_pl.c b/plugins/gpulib/vout_pl.c index f6d80814..c166b572 100644 --- a/plugins/gpulib/vout_pl.c +++ b/plugins/gpulib/vout_pl.c @@ -32,6 +32,9 @@ static void check_mode_change(int force) int w_out = w; int h_out = h; +#ifdef RAW_FB_DISPLAY + w = w_out = 1024, h = h_out = 512; +#endif gpu.state.enhancement_active = gpu.get_enhancement_bufer != NULL && gpu.state.enhancement_enable && w <= 512 && h <= 256 && !(gpu.status & PSX_GPU_STATUS_RGB24); @@ -76,6 +79,9 @@ void vout_update(void) int vram_h = 512; int src_x2 = 0; +#ifdef RAW_FB_DISPLAY + w = 1024, h = 512, x = src_x = y = src_y = 0; +#endif if (x < 0) { w += x; src_x2 = -x; x = 0; } if (y < 0) { h += y; src_y -= y; y = 0; } -- 2.39.5