Skip to content

Conversation

@Mefiresu
Copy link

SDL_UpdateTexture is often used in software rendered games for uploading the game's current framebuffer to the GPU for display. This PR greatly improves performance by using optimized memory copy routines from the OS and DMA transfer when possible.
Speedup is anywhere between 1.5x and 15x faster than the original implementation.

This PR also adds the missing max texture size for games that might rely on it, based on AMD GPU documentation close to GX2 found here: https://www.x.org/docs/AMD/old/R6xx_R7xx_3D.pdf.

Mefiresu added 2 commits May 2, 2025 17:30
According to https://www.x.org/docs/AMD/old/R6xx_R7xx_3D.pdf in section
1.3 (page 6), GX2 supports textures of up to 8192x8192 resolution.
When possible, use the DMA to copy the whole texture data at once, this
improves performance by nearly 15x in the best case.
In all other cases, use OSBlockMove instead of the base memcpy
implementation for a ~1.5x speedup in the slowest path.
@GaryOderNichts GaryOderNichts merged commit 7210c2f into devkitPro:wiiu-sdl2-2.28 May 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants