mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-08 14:56:12 -04:00
NDS: Stop flushing VRAM after copying to it
The VRAM memory area isn't cacheable, so there is no need to use DC_FlushRange(), and we can improve performance a bit by removing the call. This function would only be required if we were using DMA to copy the data to VRAM. In that case, the source in main RAM would have to be flushed before doing the DMA copy. However, CopyHWords() is a plain CPU copy, so this isn't needed at all. The following two articles are a nice introduction to cache handling on the NDS: https://web.archive.org/web/20210622053504/https://www.coranac.com/2009/05/dma-vs-arm9-fight/ https://web.archive.org/web/20210622053550/https://www.coranac.com/2010/03/dma-vs-arm9-round-2/
This commit is contained in:
parent
d7e1525ff4
commit
60a3b0742a
@ -448,8 +448,6 @@ GfxResourceID Gfx_AllocTexture(struct Bitmap* bmp, int rowWidth, cc_uint8 flags,
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure anything in data cache is flushed to VRAM
|
||||
DC_FlushRange((u8*)VRAM_A + offset, tex_size);
|
||||
VRAM_CR = banks;
|
||||
|
||||
int sSize = (Math_ilog2(tex->width) - 3) << 20;
|
||||
|
Loading…
x
Reference in New Issue
Block a user