tex-invalid

Description

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.

Coverage

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)
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

Using the Demo

START exits the demo.

The Control Stick moves the cursor.

The A Button toggles the invalidation switch at the selected point.

Snapshot

All invalidation switches are turned on.

tex-invalid-0.gif (47832 bytes)

Only switches for third quads are turned on.

tex-invalid-1.gif (44733 bytes)

Different switch configuration is set to each cache.

tex-invalid-2.gif (47898 bytes)

All invalidation switches are turned off.

tex-invalid-3.gif (44080 bytes)

Data Files Required

$REVOLUTION_SDK_ROOT/dvddata/gxTests/tex-07.tpl

Revision History

2006/03/01 Initial version.


CONFIDENTIAL