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
GU block alignment?
-
- Posts: 60
- Joined: Wed Jul 06, 2005 7:03 pm
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.
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.
-
- Posts: 75
- Joined: Mon Sep 19, 2005 5:41 am
-
- Posts: 60
- Joined: Wed Jul 06, 2005 7:03 pm
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...
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...
-
- Posts: 60
- Joined: Wed Jul 06, 2005 7:03 pm