Skip to content

Can the canvas upload be faster on slow computers? #150

@Dawoodoz

Description

@Dawoodoz

On a fast computer, upscaling and uploading the canvas only takes a millisecond. On a slow computer limited by memory bandwidth however, upscaling and uploading the canvas takes 25 milliseconds (90% of the total frame time).

No GPU
Many of the worst case computers do not have any dedicated graphics card, and might not even have integrated graphics or GPU drivers. So using different graphics APIs to upload the canvas would end up making it even slower by emulating random access texture sampling on software emulated graphics drivers.

No native resolution change
Changing screen resolution from the application is one of the most common cause of crashes in mainstream media layers, because there is no resolution that is guaranteed to be supported. Most users do not have a CRT monitor capable of changing the native resolution, so you would ether fake it with GPU drivers, use a scaler in the computer screen, or crash because neither was available. Changing desktop resolution manually before starting a game does give better performance without causing crashes, but it gives blurry pixels with bi-linear interpolation, has less margin to scale the image properly, and mess up the desktop shortcuts.

Optimize upscaling?
Using zip and shuffle operations for vectorization on multiple threads might improve the performance of scaling up pixels, but the worst case computers only have a single ARMv6 CPU core without any useful SIMD instructions.

Shared memory?
Because a swap-chain is already used, there might be alternative ways to show the pixels without making a memory copy. This would probably rely on non-standard extensions and ugly memory hacks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions