User's Manual

Intel® 815 Chipset: Graphics Controller PRM, Rev 1.0
R
53
6. Blt Engine Programming
6.1. BLT Engine Programming Considerations
6.1.1. When the Source and Destination Locations Overlap
It is possible to have BLT operations in which the locations of the source and destination data overlap.
This frequently occurs in BLT operations where a user is shifting the position of a graphical item on the
display by only a few pixels. In these situations, the BLT engine must be programmed so that destination
data is not written into destination locations that overlap with source locations before the source data at
those locations has been read. Otherwise, the source data will become corrupted.
The following figure shows how the source data can be corrupted when a rectangular block is copied
from a source location to an overlapping destination location. The BLT engine reads from the source
location and writes to the destination location starting with the left-most pixel in the top-most line of
both, as shown in step (a). As shown in step (b), corruption of the source data has already started with the
copying of the top-most line in step (a) — part of the source that originally contained lighter-colored
pixels has now been overwritten with darker-colored pixels. More source data corruption occurs as steps
(b) through (d) are performed. At step (e), another line of the source data is read, but the two right-most
pixels of this line are in the region where the source and destination locations overlap, and where the
source has already been overwritten as a result of the copying of the top-most line in step (a). Starting in
step (f), darker-colored pixels can be seen in the destination where lighter-colored pixels should be. This
errant effect occurs repeatedly throughout the remaining steps in this BLT operation. As more lines are
copied from the source location to the destination location, it becomes clear that the end result is not
what was originally intended.