hello again,
I have some few questions ;-)
---------------------------
first:
i made a fps counter.
The first number i've got was 59.7fps (propably it should be 60fps).
the next with more triangles and textures was 30fps
something is propably synchronising it. Could be this synchronisation disabled? it's harder to measure performance of each part of engine.
----------------------
second:
is there performance difference between textures
256 colours 128x64
and
256 colours 64x128
?
(both 8kb cache suitable and swizzled)
somebody told me, that in ps2 it was difference and 64x128 was not suitable
(i have tested it, and i saw no difference)
-------------------------
third:
i have a problem with using entire vram memory. I can't localize, where is free space, and where's not
this is a part of code:
#define VRAM_OFFSET ((512*280*4)*3)
...
sceGuInit();
sceGuStart(GU_DIRECT,list);
sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH);
sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH);
sceGuDepthBuffer((void*)0x110000,BUF_WIDTH);
sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2));
sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT);
sceGuDepthRange(0xc350,0x2710);
vramaddr = (0x40000000 | (u32)sceGeEdramGetAddr()) + VRAM_OFFSET;
vRamDest= (unsigned char *)vramaddr;
...
FOR EACH TEXTURE AFTER LOADING:
{
sceGuCopyImage(pTex->dataformat, 0, 0, pTex->w, pTex->h, pTex->w, pTex->data, 0, 0, pTex->w, (void*)(vRamDest));
sceGuTexSync(); // make sure the copy finishes before starting to use it
sceGuTexFlush(); // clear the previous texture out of the GE texture cache
pTex->vdata=vRamDest;
vRamDest+=datasize;
}
...
i have correctly loaded around 300kb of textures (of 500kb), but the few of last has incorrectly data in vram (propably owerwritten by color buffer - changing every frame, when changing the scene)
if you have any idea, i will be very thankfull for them.
thanks anyway
Tony
few questions (synchro, textures)
Re: few questions (synchro, textures)
you probably have something like this in your main loop:outtony wrote:something is propably synchronising it. Could be this synchronisation disabled? it's harder to measure performance of each part of engine.
Code: Select all
sceDisplayWaitVblankStart();
sceGuSwapBuffers();
infj
Re: few questions (synchro, textures)
i thought that i tried to remove it. heh, propably not. Now it works well. thanks :)Saotome wrote:you probably have something like this in your main loop:outtony wrote:something is propably synchronising it. Could be this synchronisation disabled? it's harder to measure performance of each part of engine.the sceDisplayWaitVblankStart is "synchronising" it, now guess how to disable it ;)Code: Select all
sceDisplayWaitVblankStart(); sceGuSwapBuffers();
yp, that was a problem.ReKleSS wrote:I think your math is messed up. 2mb of vram = 0x200000, 512 * 280 * 4 * 3 = 0x1a4000, 0x200000 - 0x1a4000 = 0x5c000 = around 380kb. You're probably out of vram.
-ReK
now i have vram free mem calculator. Some textures are stored in vram some in ram, but i have to optimalise them to 368kb (5C000)