Programming Tips
TVP4020
Programmers Reference Manual
144
7.4
Copies and Downloads
7.4.1
Copies
If the pixel size is 8 or 16 bits per pixel, the copy speed can be improved
by moving more than one pixel at a time. This is achieved by setting the
PackedCopy bit in the Framebuffer Read unit. This bit tells P
ERMEDIA
that
it should pretend that the pixel size is 32 bits and calculate the
addresses accordingly. The screen width does not need to be changed,
nor does the base address or source offset value. The Rasterizer should
be programmed to rasterize a rectangle that is a factor of four narrower
(for 8 bit pixels) or a factor of 2 narrower (for 16 bit pixels) than the
normal size.
The groups of four or two pixels that are copied are all aligned to a 32 bit
boundary, but if some of the edge pixels are not needed, the
PackedDataLimits register can be used to mask them out. If the source
and destination pixels have a different alignment then the RelativeOffset
field in the FBReadMode register can be used to specify how the source
needs to be shifted to line up with the destination.
7.4.2
Downloads
The same registers described in the previous tip can also be used to
pack data during a download to the framebuffer or localbuffer. If the
Rasterizer is set to sync on FBData, the data sent to P
ERMEDIA
must be
in the raw memory format. Four 8 bit pixels can be written at one time to
the chip, and the PackedDataLimits register set to mask any unwanted
pixels at the left and right edges; the RelativeOffset field is used to shift
the alignment of the data as it is being stored.
Downloads to the localbuffer can use LBData, but the Rasterizer does
not support sync on LBData, so the data must be explicitly synchronized
using the Sync command. Alternatively, downloads of stencil and/or
depth data can be performed through the framebuffer write unit, allowing
WaitForCompletion or sync on FBData to be used.
7.4.3
Loading Textures
P
ERMEDIA
handles internal synchronization so that all necessary writes
complete before reads for a given buffer. If the same data is treated as
two different types then the chip must be explicitly synchronized. When a
texture is downloaded it is written to memory through the framebuffer
write unit, but it is read through the Texture Read unit. This means that
the chip must be synchronized between loading the texture and reading
it otherwise it is not guaranteed that the writes will have completed
before the reads have begun. A Sync command can be used to do this,
Summary of Contents for TVP4020 PERMEDIA 2
Page 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Page 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Page 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Page 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Page 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Page 323: ...Index TVP4020 Programmers Reference Manual 314 ...