 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
outtony

Joined: 13 Oct 2005 Posts: 26 Location: Slovakia
|
Posted: Tue Nov 15, 2005 2:44 am Post subject: few questions (synchro, textures) |
|
|
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 _________________ -----------------------------
Tony
www.n3.sk |
|
| Back to top |
|
 |
Saotome

Joined: 03 Apr 2004 Posts: 182
|
Posted: Tue Nov 15, 2005 3:39 am Post subject: Re: few questions (synchro, textures) |
|
|
| outtony wrote: | something is propably synchronising it. Could be this synchronisation disabled? it's harder to measure performance of each part of engine.
|
you probably have something like this in your main loop:
| Code: |
sceDisplayWaitVblankStart();
sceGuSwapBuffers();
|
the sceDisplayWaitVblankStart is "synchronising" it, now guess how to disable it ;) _________________ infj |
|
| Back to top |
|
 |
outtony

Joined: 13 Oct 2005 Posts: 26 Location: Slovakia
|
Posted: Tue Nov 15, 2005 3:44 am Post subject: Re: few questions (synchro, textures) |
|
|
| Saotome wrote: | | outtony wrote: | something is propably synchronising it. Could be this synchronisation disabled? it's harder to measure performance of each part of engine.
|
you probably have something like this in your main loop:
| Code: |
sceDisplayWaitVblankStart();
sceGuSwapBuffers();
|
the sceDisplayWaitVblankStart is "synchronising" it, now guess how to disable it ;) |
i thought that i tried to remove it. heh, propably not. Now it works well. thanks :) _________________ -----------------------------
Tony
www.n3.sk |
|
| Back to top |
|
 |
ReKleSS

Joined: 18 Jun 2005 Posts: 73 Location: Melbourne, Australia
|
Posted: Tue Nov 15, 2005 8:39 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
outtony

Joined: 13 Oct 2005 Posts: 26 Location: Slovakia
|
Posted: Tue Nov 15, 2005 6:48 pm Post subject: |
|
|
| 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 |
yp, that was a problem.
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) _________________ -----------------------------
Tony
www.n3.sk |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|