| View previous topic :: View next topic |
| Author |
Message |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Wed Apr 05, 2006 6:16 pm Post subject: GU block alignment? |
|
|
What is the block alignement size? I assume it's 64 as 480 is a multiple of 32.
I know the normal block width / alignment used is 512 for a 480 pixel wide display, but I want to render onto a memory area used for a texture in the VRAM (e.g. a remote camera displaying on a monitor type object).
The texture is only going to be about 128 texels wide, so it seems a waste to use 512, I'd rather go with the minimum alignment over the texture size.
Cheers,
Dave |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Wed Apr 05, 2006 8:01 pm Post subject: |
|
|
Having had a good luck through pspgu.h I assume it's related to the quad word alignment (16 byte)?
Not sure how that affects my calculations though?
e.g. I'm rendering with a 32 bit pixel format (4 bytes), it needs to be a multiple of 4 pixels to align... That's quite a few less than the 32 pixels used in the samples, and much less than the 64 I suggested above...
I'm stumped, but will continue to look whilst hoping somebody can put me straight. |
|
| Back to top |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Sat Apr 08, 2006 2:02 pm Post subject: |
|
|
| Did you figure this out? I'm not completely sure what you are asking. If you explain it better I am sure I can help. |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Tue Apr 11, 2006 2:03 am Post subject: |
|
|
Not yet, but moving house, so not developing anything in my own time for the next few months :( unless I can squeeze some in at work.
Anyways...
When you setup a GU list and define the viewport, offset, etc you have to provide a buffer width. This seems to always be set to 512 in the samples. The screen width is obviously 480 (i.e. 32 less than 512). I want to know why the buffer width is set to 512?
What else can it be set to?
My reason for this is that I have a remote camera, in say a TV studio. The feed from the camera is displaying on a monitor in another room. The player gets to the monitor and sees what the camera sees via this monitor.
Now, that's quite hard, or I could use the PSP & the game code to render what the camera sees on a little bit of VRAM that isn't part of the display, draw or depth (etc) buffer.
e.g. I setup another context that offsets elsewhere into the 4096x4096 block, and use that pointer to be the texture of the monitor.
BUT if I have to draw a full screen it will take ages and/or take up a lot of VRAM it doesn't need to - I only need a 64x64 texture say. So I want to draw to a smaller buffer, but I don't know what the buffer width can be set to.
That make more sense? I think I rambled quite a lot... |
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Tue Apr 11, 2006 2:38 am Post subject: |
|
|
By my rendering logic knowledge, I would suppose it has to be a power of 2, so 32,64,128,256,512 should all be possible theoretically.
This would be to calculate offsets quickly by shifts, rather then muls. |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Tue Apr 11, 2006 5:36 pm Post subject: |
|
|
Ah! Cheers Raphael, that makes sense.
Will try it out asap and come bak with my results. |
|
| Back to top |
|
 |
|