This program does the test for the texture cache invalidation function. The eight cache regions have a one-to-one correspondences to the eight texture objects. Each texture object uses only one dedicated region (for example, texobj 0 uses cache 0 and texobj1 uses cache 1). Textured quads are drawn five times by using each texture object while image data in main memory is overwritten by other data after drawing 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.
| Function | 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) | |
GXLoadTexObj |
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 for each cache.

All invalidation switches are turned off.

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