Hello, i'm getting some problem with cache. I'm using GU to draw sprites and 3d but something it's displayed and something not. It's a cache problem.
I've tried to use
sceKernelDcacheWritebackInvalidateRange
for vertex data. But it didn't solve my problem at all, there is still something not drawn. Where should i flush the cache ? After what gu/gum functions?
PSP Cache issues
-
- Posts: 376
- Joined: Wed May 10, 2006 11:31 pm
Try:
Just after you start your game loop. (ie. your while loop or whatever)
[EDIT] You should get your own personal thread!
Code: Select all
sceKernelDcacheWritebackAll();
[EDIT] You should get your own personal thread!
-
- Posts: 70
- Joined: Thu Jun 22, 2006 9:24 pm
-
- Posts: 376
- Joined: Wed May 10, 2006 11:31 pm
-
- Posts: 70
- Joined: Thu Jun 22, 2006 9:24 pm
-
- Posts: 70
- Joined: Thu Jun 22, 2006 9:24 pm
The reason you write back the cache stuff is so that when the GU tried to read out of system ram, what's in system ram is what you actually wrote there. You want to place your sceKernelDcacheWritebackAll just before where the GU should be reading out the data. Generally, put them before sceGumDrawArray - that's what gets the GU to actually start doing stuff.