Programming Tips
TVP4020
Programmers Reference Manual
142
7.2.3
Loading Registers in Unit Order
To maximize performance, the control registers for the next primitive
should be loaded into the P
ERMEDIA
FIFO in unit order. Thus the registers
associated with the Rasterizer unit should be loaded first, then Scissor,
Stipple, Localbuffer Read, and so on until the last unit to be loaded is the
Host Out unit (if necessary). Then finally the relevant command register
should be loaded.
For the order of the units in the hyperpipeline, refer to Fig. 5.1.
7.2.4
Use of Continue Commands
The continue commands provide an efficient method for drawing
complex primitives without decomposing them into trapezoids or single
lines.
As far as context switching is concerned, each primitive should be
treated as atomic. For example, if P
ERMEDIA
context switched after the
Render command for a triangle, but before it’s associated
ContinueNewDom command, the second part of the primitive may be
drawn incorrectly. This is because P
ERMEDIA
relies on internal state set-
up by the Render command which would have been corrupted by any
intervening context.
A second requirement of the continue commands is that data written to
the framebuffer or localbuffer before the continue, should not be read
after it. This is not a common occurrence, but a possible situation is
where two lines are drawn, the second joining the end of the first and
being started by ContinueNewLine. If these lines are XOR'd they will
read the pixel they are about to write to. If the second line is at a sharp
angle so that it folds back and overwrites some or all of the first line, the
XOR operation is not guaranteed to be correct because the pixels from
the first line may not have been written to memory before the second
line reads them.
If this situation is likely to occur, a Sync command should be sent before
the ContinueNewLine. This will ensure that all necessary writes
complete before the corresponding reads. The software does not have
to wait for the Sync to be read from the output FIFO, simply sending
Sync is enough to guarantee correct operation.
7.3
Area Filling Techniques
7.3.1
Clearing Buffers Quickly
Block writes are a feature of SGRAMs. Data written once to a single
address can be applied to several addresses at the same time. This is a
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 ...