Test new-style accelerated functions (As of this writing: Ark, Cirrus, Chips &
Technologies cards, and Mach32 only).
For other cards the demo will not work (well it will complain about missing accelerator
support). Don't worry about this.
During the development of the Mach32 new style driver for 1.2.12, this demo was massively
extended to check the Mach32 functions.
Upon startup it lists all supported SVGA modes and asks you to enter a number
identifying the mode to be tested. The supported subfunctions of
vga_accel (3)
in this mode are listed and the demo instructs to press
<Return>
to start the demos.
If supported, all drawing operations are performed in the background.
Then the following tests are performed:
These tests were originally intended to check that the accelerator commands work on the
proper screen locations. The screen shows 12 (4 x 3) smaller areas with red crosses in the
corners. When everything is ok, the drawings should reach right in the corners of the crosses.
A given card may not support all operations listed here. In that case the resp. test area
just shows the red crosses. For tests performed, the name of the test is printed below the
area. The tests are (from left to right, top to bottom):
A green box is drawn with
vga_accel(ACCEL_FILLBOX) .
A cross of green lines is drawn with
vga_accel(ACCEL_DRAWLINE) .
A linux pixmap just fitting into the crosses is drawn with
vga_accel(ACCEL_PUTIMAGE) .
A pixmap just fitting into the crosses is drawn into the red crosses (by
vgagl (5)
which may or may not use the accelerator). The pixmap is then copied to a few lines/columns
below. Green crosses mark the intended destination position.
Works like 3. but copies to an area above the origin. The accelerator must ensure that the
overlapping areas are handled non corrupting. Thus, watch that the copy operation is properly
performed.
A green triangle is drawn above the top/left to bottom/right diagonal by use of
vga_accel(ACCEL_DRAWHLINELIST) .
Certain bitmaps are copied to the screen. In the corners you'll see the digits
bottom/left, black on white.
bottom/right, white on black. Note that some black border, not the digit will be aligned
to the red crosses.
Finally, a yellow wizard image is drawn into the center.
The bit ordering for bitmaps is a bit weird. Please check that the digits are not mirrored or
flipped.
This time bitmap transparency is tested by drawing wizard images onto the aforementioned
linux pixmap (left to right, top to bottom) in yellow, red, green, and cyan. The background
of the yellow wizard is masked out by a black border bitmap.
Note that the wizard will not reach into the red corners because the bitmap has some
(transparent) border.
The text below this box is copied as a monochrome bitmap from the screen into the corners
listed under 7. in the same colors.
Two green rectangles with an edge cut out from the bottom is drawn using
vga_accel(ACCEL_POLYLINE) . There is an intended bug which draws the center of the
top line twice. If supported, the lower rectangle is drawn in cyan and with the xor
raster operation s.t. the buggy point is not drawn thus leaving a pin hole.
vga_accel(ACCEL_POLYHLINE) is used to draw some green lines which makes this area look
like a green box with a cut out, black M-style shape.
A weird green polygon is filled in red with
vga_accel(ACCEL_POLYFILLMODE)
using the techniques given in
vga_accel (3).
This needs some offscreen memory. If VGA memory is tight in that resolution the test cannot
be performed.
After this screen, you'll have to hit
<Return>
to continue.
Again, red cross bordered areas are drawn on the screen, this time for each of the supported
raster operations. For
ROP_AND and ROP_XOR
the areas are filled in white first.
Three overlapping boxes
A , B , C
are drawn such that you see the following areas.
AAAAAA dddd BBBBBB
AAAAAA dddd BBBBBB
AAAAAA dddd BBBBBB
AAAA ee gggg ff BBBB
AAAA ee gggg ff BBBB
AAAA ee gggg ff BBBB
CCCCCCCC
CCCCCCCC
CCCCCCCC
The pictures should show:
Replace mode. A, B, C are red, green, blue. They just overlap, yielding
d - green and e, f, g - blue.
The colors mix using
ROP_OR
(and a nice color table). The overlapping areas become the additive color mix:
d - yellow, e - magenta, f - cyan, and g - white.
ROP_AND
is used. The background is filled white first, s.t. there is something in video memory
to and with non trivially. We have A, B, C in cyan, magenta, yellow and d, e, f, g
in blue, green, red, black.
ROP_XOR
is used and the background filled white first too. A, B, C are red, green, blue again, but
the overlapping areas d, e, f, g become blue, green, red, white.
ROP_INV
is used, s.t. A, B, C are all white and d, e, f, g become black, black, black, white.
Note that this is not done by using
ROP_XOR
and drawing A, B, C in white. Instead A, B, C are drawn in the usual
red, green, blue. However, the accelerator just inverts the memory contens.
If the accelerator supports raster operations for
ACCEL_DRAWHLINELIST
actually disks (well, ellipses) are drawn instead of boxes.
After this screen, you'll have to hit
<Return>
to continue.
If
ACCEL_DRAWLINE
is supported, a Quix like bouncing series of lines in varying colors is drawn. The lines
are removed from the screen by overdrawing them in black, thus erasing the dots and text
on the background.
The test lasts about 5 seconds and some statistics are printed to stdout.
As before, but this time all lines are drawn in
ROP_XOR
mode (if
ACCEL_DRAWLINE
supports raster operations). Thus the background will not be destroyed this time.
The test lasts about 5 seconds and some statistics are printed to stdout.
The screen is
ACCEL_FILLBOX
filled with a series of boxes of increasing colors.
In truei/high color modes you'll probably only see a series of varying blue tones (because these
are at the beginning of the color table and there are soo many of them).
The test lasts about 5 seconds and some statistics are printed to stdout.
Some random dots are drawn on the screen and thirds of the screen contents are moved
around using
ACCEL_SCREENCOPY .
The test lasts about 5 seconds and some statistics are printed to stdout.
Some random dots are drawn on the screen and moved one line up with
ACCEL_SCREENCOPY .
In offscreen memory a new line is prepared which will be cleared by
ACCEL_FILLBOX and move in from below. This test requires some offscreen and will not
be performed if video memory is very tight.
The test lasts about 5 seconds and some statistics are printed to stdout.
Like the FillBox test, but no box fill is done but the screen is filled with a list of
horizontal lines drawn with
ACCEL_DRAWHLINELIST .
The test lasts about 5 seconds and some statistics are printed to stdout.
Like the FillBox test, but the XOR raster operation is used.
The test lasts about 5 seconds and some statistics are printed to stdout.
The screen is filled with bitmasks consisting of tiny vertical lines alternating in red and
blue.
The test lasts about 5 seconds and some statistics are printed to stdout.