... Why not having an option to use the IPU for downscaling? You wouldnt need to use software for upscaling/downscaling the image, saving whatever amount of CPU cycles, ....
Hey, Hiban. Don't worry, it's already on our TODO list. Yes, it would look better, but it would not save any CPU cycles, in fact it would cost quite a few
. The only exception would be if using the IPU to upscale horizontal resolutions of 256, like Castlevania SOTN, but it'd only be a very negligable speedup in that one case.
When a frame is done rendering it must be converted from PSX pixel format to our native framebuffer format. When doing this, the current downscaler (of gpu_unai plugin) simply skips over a certain number of pixels per line, entirely skipping every other line if in interlaced 480-height mode. The trouble is that the PSX framebuffer is not in a native format, it is 15-bit format with a reverse pixel ordering than GCW framebuffer, with the MSB holding blend/mask metadata. So, every frame is first rendered in 15bpp native format, and then must be converted pixel-by-pixel and copied to SDL framebuffer. If you were to enable downscaling, more pixels would need to be converted and copied than already are. So, it can only improve image quality, but not speed. If a game is using merely a 384x240 resolution, the speed hit wouldn't be bad at all, but a width of 512 or 640, especially combined with an interlaced height of 480, would cost quite a few more CPU cycles.
What is worse, the gpu_unai plugin is currently rendering only whatever pixels actually end up displayed on a 320x240 screen. If you enable downscaling, let's say for a 640x480 game as an example, it will be rendering at minimum
4x the number of pixels (actually quite a few more since there are always layers of polys/sprites), in addition to 4x the color conversion and 4x the number of pixels to copy to to SDL framebuffer, each frame.