PowerVR Series1

Up
Bilinear Filtering
Hardware Clipping
Performance n-gons
Performance Optimisations
HW-SW Overlap
PowerVR Detection
S3 Memory

 

Frequently Asked Questions

Fast Hardware Clipping on PowerVR

PowerVR hardware clips triangles to the screen rectangle without any performance cost. (There is usually a substantial penalty for doing this in Z buffer systems.) The clipping process takes no time at all in hardware and all the software driver has to do is calculate the rectangles of 32x32 pixel display tiles that contain each triangle. The edges of the display device do not have to be multiples of 32 pixels. It is unnecessary to subdivide clipped triangles to keep them onscreen which should help performance considerably, though Z clipping is still required to keep InvW positive.

Without any performance loss it is possible to restrict the rectangle of tiles (also known as regions) that triangles are put into for viewport effects such as a rear-view mirror. This can be done within the same hardware render as triangles that are sent to other areas of the screen. For this reason the InvW values for triangles in the viewport should be closer than those of the rest of the screen to ensure the viewport triangles are on top.

sgltri_startofframe sets the SGLCONTEXT region variables to the correct values for the whole device. These variables are FirstXRegion, LastXRegion, FirstYRegion, LastYRegion, invRegX and invRegY.

invRegX and invRegY are (1 / X tile size) and (1 / Y tile size) respectively. The usual values are 1/32 for both, though future drivers and future hardware may use different tile sizes for performance reasons so these values should always be checked. The maximum region size will be 32x32 (the usual size for the PCX1 and PCX2 chips), and future hardware may reduce this to 32x8.

To clip a set of triangles to a certain rectangle of tiles, set the FirstXRegion etc. variables to the required rectangle (0,0 is top left, and the last region should always be greater than or equal to the first region).

To go back to putting triangles into the whole device, and always before calling sgltri_render, be sure to return the FirstXRegion etc. variables to their original values set by the sgltri_startofframe call. Otherwise, only the latest defined viewport area will be sent to the hardware.

 

Confidential / provided under Non-Disclosure Agreement
Copyright © 1999-2000, PowerVR Technologies and partners. PowerVR Technologies is a division of Imagination Technologies Limited.