| View previous topic :: View next topic |
| Author |
Message |
jonny
Joined: 22 Sep 2005 Posts: 351
|
Posted: Mon May 08, 2006 7:59 pm Post subject: gu buffers width and block-aligned + sceGuTexImage |
|
|
on various gu functions i see the "block aligned" requirement (typically on buffer width parameters)
1) what is the block size? (is it a way to say "a power of 2"?)
about sceGuTexImage:
| Code: |
/**
* Set current texturemap
*
* Textures may reside in main RAM, but it has a huge speed-penalty. Swizzle textures
* to get maximum speed.
*
* @note Data must be aligned to 1 quad word (16 bytes)
*
* @param mipmap - Mipmap level
* @param width - Width of texture (must be a power of 2)
* @param height - Height of texture (must be a power of 2)
* @param tbw - Texture Buffer Width (block-aligned)
* @param tbp - Texture buffer pointer (16 byte aligned)
**/
void sceGuTexImage(int mipmap, int width, int height, int tbw, const void* tbp);
|
2) have someone made experiments with tbw parameter?
in this thread: http://forums.ps2dev.org/viewtopic.php?t=4213 Brunni seems to use 250 with success.
i'm also interested to know if a value > 512 can be used.
i'll go to check this myself, anyway if someone already did this and want to share infos ... :)
thanks |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Tue May 09, 2006 3:49 am Post subject: |
|
|
MAX texture dimensions GU can handle is 512x512
you cannot use 520x512 for example texture buffer
width of course also has this limitation
swizzling textures/quad word alignment info in found in ps2dev wiki _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
jonny
Joined: 22 Sep 2005 Posts: 351
|
Posted: Tue May 09, 2006 6:01 am Post subject: |
|
|
i'm running some tests
| Quote: |
width of course also has this limitation
|
this seems not true (note that i'm talking about texture buffer width)
i'm setting a buffer of (512+16) x 272 pixels (i fill it with a true (512+16) x 272 texture)
i setup the texture in this way:
sceGuTexImage(0,512,512,512+16,p);
and is rendered correctly :) (at least the 480x272 portion)
texture buffer width need to be divisible by 16, after some tests, this seems the only requirement (max width seems 2048-16)
i'm using an 8bit texture + a palette, i dunno if this make some difference |
|
| Back to top |
|
 |
|