User's Manual

Intel® 815 Chipset: Graphics Controller PRM, Rev 1.0
R
67
monochrome BLT operand following the BLT_TEXT command. The BLT engine will receive this data
through the command stream and use it as the source data for this BLT operation. The BLT engine will
be set to the same color depth as the graphics system
8 bits per pixel, in this case. Since the source
data in this BLT operation is monochrome, color expansion must be used to convert it to an 8 bpp color
depth. To ensure that the gray background behind this letter “f” is preserved, per-pixel write masking will
be performed, using the monochrome source data as the pixel mask.
The BLT Setup and Text command packets are used to select the features to be used in this BLT
operation. Only the fields required by these two command packets must be programmed carefully. The
BLT engine ignores all other registers and fields. The source select field must be set to 1, to indicate that
the source data is provided by the host processor through the IMMEDIATE_BLT command packet.
Finally, the raster operation field should be programmed with the 8-bit value CCh to select the bit-wise
logical operation that simply copies the source data to the destination. Selecting this bit-wise operation in
which no pattern data is used as an input, causes the BLT engine to automatically forego reading pattern
data from the frame buffer.
The Setup Pattern/Source Expansion Foreground Color Register to specify the color with which the letter
“f” will be drawn. There is no Source address. All scan lines of the glyph are bit packed and the clipping
is controlled by the ClipRect registers from the SETUP_BLT command and the Destination Y1, Y2, X1,
and X2 registers in the TEXT_BLT command. Only the pixels that are within (inclusive comparisons)
the clip rectangle are written to the destination surface.
The Destination Pitch Register must be programmed with a value equal to the number of bytes in the
interval between the first bytes of each adjacent scan line’s worth of destination data. Since the color
depth is 8 bits per pixel and the horizontal resolution of the display is 1024 pixels, the value to be
programmed into these bits is 400h, which is equal to the decimal value of 1024. Since the source data
used in this BLT operation is monochrome, the BLT engine will not use a byte-oriented pitch value for
the source data.
Since the source data is monochrome, color expansion is required to convert it to color with a color depth
of 8 bits per pixel. Since the Setup Pattern/Source Expansion Foreground Color Register is selected to
specify the foreground color of black to be used in drawing the letter “f”, this register must be
programmed with the value for that color. With the graphics system set for a color depth of 8 bits per
pixel, the actual colors are specified in the RAMDAC palette, and the 8 bits stored in the frame buffer for
each pixel actually specify the index used to select a color from that palette. This example assumes that
the color specified at index 00h in the palette is black, and therefore bits [7:0] of this register should be
set to 00h to select black as the foreground color. The BLT engine ignores bits [23:8] of this register
because the selected color depth is 8 bits per pixel. Even though the color expansion being performed on
the source data normally requires that both the foreground and background colors be specified, the value
used to specify the background color is not important in this example. Per-pixel write-masking is being
performed with the monochrome source data as the pixel mask, which means that none of the pixels in
the source data that will be converted to the background color will ever be written to the destination.
Since these pixels will never be seen, the value programmed into the Pattern/Source Expansion
Background Color Register to specify a background color is not important.
The Destination Width and Height Registers are not used. The Y1, Y2, X1, and X2 are used be program
with values that describe to the BLT engine the 8x8 pixel size of the destination location. The
Destination Y1 and Y2 address registers must be programmed with the starting and ending scan line
address of the destination data. This address is specified as an offset from the start of the frame buffer of
the scan line at the destination that will be written to first. The destination X1 and X2 registers must be
programmed with the starting and ending pixel offsets from the beginning of the scan line.