This program does the test for the texture cache invalidation function. The eight cache regions have one-to-one correspondences to the eight texture objects. Each texture object uses only one dedicated region (for example, texobj0 uses cache0 and texobj1 uses cache1). Textured quads are rendered five times by using each texture object while image data in main memory is overwritten by other data after rendering each quad. You can control whether cache invalidation should be done before drawing the next quad and whether to reflect the overwritten image. As for the fifth quad, GXInvalidateTexAll is called and so always reflects the overwritten image.
| Functions | Parameters | Description |
GXInitTexObj |
Pointer to image data. | Appropriate value. |
| Width and height | Fixed. | |
| format | Always GX_RGB565 |
|
| Wrap mode (s, t) | Always GX_REPEAT |
|
| Mipmap | Always GX_TRUE |
|
GXInitTexObjUserData |
User data pointer | Integer ID numbers |
GXGetTexObjUserData |
(no parameter) | |
|
Destination texture name. | Always GX_TEXMAP0 |
GXInitTexCacheRegion |
32-bit mipmap flag. | Always GX_FALSE |
| TMEM address (even, odd). | Appropriate lower bank address (even) appropriate higher bank address (odd) |
|
| Cache size (even, odd). | Always GX_TEXCACHE_32K |
|
GXSetTexRegionCallBack |
Callback Functions | One function |
GXInvalidateTexRegion |
Texture region | Appropriate cache regions |
GXInvalidateTexAll |
(no parameter) | |
GXSetTevOp |
TEV stage ID | GX_TEVSTAGE0 |
| Operation mode | GX_REPLACE |
START exits the demo.
The Control Stick moves the cursor.
The A Button toggles the invalidation switch at the selected point.
All invalidation switches are turned on.

Only switches for third quads are turned on.

Different switch configuration is set to each cache.

All invalidation switches are turned off.

$REVOLUTION_SDK_ROOT/dvddata/gxTests/tex-07.tpl
2006/03/01 Initial version.
CONFIDENTIAL