![background image](http://html.mh-extra.com/html/texas-instruments/tvp4020-permedia-2/tvp4020-permedia-2_reference-manual_1097169032.webp)
TVP4020
Programmers Reference Manual
Programming Model
23
To read a P
ERMEDIA
register the host reads the same address which
would be used for a write,
i.e. the base address of the register file plus
the offset value for the register.
Note that since internal registers cannot be read back care must be
taken when context switching a task which is making use of continue-
draw commands. Continue-draw commands rely on the internal registers
maintaining previous state. This state will be destroyed by any rendering
work done by a new task. To prevent this, continue-draw commands
should be performed via DMA since the context switch code has to wait
for outstanding DMA to complete. Alternatively, continue-draw
commands can be performed in a non-preemptable code segment.
Normally, reading back individual registers should be avoided. The need
to synchronize with the chip can adversely affect performance. It is
usually more appropriate to keep a software copy of the register which is
updated whenever the actual register is changed.
3.8
Byte Swapping
Internally P
ERMEDIA
operates in little-endian mode. However, P
ERMEDIA
is
designed to work with both big - and little-endian host processors. Since
the PCI Bus specification defines that byte ordering is preserved
regardless of the size of the transfer operation, P
ERMEDIA
provides
facilities to handle byte swapping. See the
TVP4020 Hardware
Reference Manual for more details of byte-swapping via the PCI bus.
Additional support is provided within the graphics core of the chip to byte
swap images and bitmasks as they are transferred to and from the host.
These are documented in the relevant sections of chapter §5.
3.9
Red and Blue Swapping
For a given graphics board the RAMDAC and/or API will usually force a
given interpretation for true color pixel values. For example, 32-bit pixels
will be interpreted as either RGB (red at byte 2, green at byte 1 and blue
at byte 0) or BGR (blue at byte 2 and red at byte 0). The byte position for
red and blue may be important for software which has been written to
expect one byte order or the other, in particular when handling image
data stored in a file.
P
ERMEDIA
provides three registers to specify the byte positions of blue
and red internally. In the Texture/Fog/Blend unit the AlphaBlendMode
register contains a 1-bit field called ColorOrder. If this bit is set to zero
then the byte ordering is BGR; if the bit is set to one then the ordering is
RGB. As well as setting this bit in the Alpha Blend unit, it must also be
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 ...