
Graphics Programming
TVP4020
Programmers Reference Manual
98
5.10
Framebuffer Read and Write Units
Before drawing can take place, P
ERMEDIA
must be configured to perform
the correct framebuffer read and write operations. Framebuffer read
modes affect the operation of alpha blending, logic ops, software
writemasks, image upload and image copy operations. Framebuffer write
modes are relevant to all drawing in the framebuffer.
5.10.1
Framebuffer Read
The FBReadMode register allows P
ERMEDIA
to be configured to make 0,
1 or 2 reads of the framebuffer. The following are the most common
modes of access to the framebuffer:
•
Rendering operations with no logical operations, software
writemasking or alpha blending. In this case no read of the
framebuffer is required and framebuffer writes should be enabled.
Framebuffer reads should be disabled for maximum efficiency.
•
Rendering operations which use logical ops, software writemasks or
alpha blending. In these cases the destination pixel must be read from
the framebuffer and framebuffer writes must be enabled.
•
Image copy operations. Here set-up depends on whether logical ops,
software writemasks and/or alpha blending are occurring with the
copy. If any of these are, the framebuffer needs two reads, one for the
source and one for the destination. Otherwise, only one read is
required.
•
Image upload. This requires reading of the destination framebuffer
pixels to be enabled and framebuffer writes to be disabled.
•
Image download. This case requires no framebuffer reads (as long as
software writemasking, alpha blending and logic ops are disabled) but
writes must be enabled.
Note: Avoiding unnecessary additional reads will enhance performance.
For both the read and the write operations, an offset is added to the
calculated address. The source offset (FBSourceOffset) is used for copy
operations. The pixel offset (FBPixelOffset) can be used to allow multi-
buffer updates
1
. The offsets should be set to zero for normal rendering.
The address calculation implements the following equations:
1
The OpenGL specification, for example, allows any combination of the Front, Back, Left
and Right color buffers to be updated 'simultaneously'. In this case a scene would be
rendered multiple times changing the FBPixelOffset as appropriate. When using 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 ...