1accel(6)                      Svgalib User Manual                     accel(6)
2
3
4

NAME

6       accel - tests the new style svgalib accelerator interface
7

SYNOPSIS

9       accel
10
11

DESCRIPTION

13       Test  new-style accelerated functions (As of this writing: Ark, Cirrus,
14       Chips & Technologies cards, and Mach32 only).  For other cards the demo
15       will  not  work  (well  it will complain about missing accelerator sup‐
16       port). Don't worry about this.
17
18       During the development of the Mach32 new style driver for 1.2.12,  this
19       demo was massively extended to check the Mach32 functions.
20
21       Upon  startup it lists all supported SVGA modes and asks you to enter a
22       number identifying the mode to be tested. The supported subfunctions of
23       vga_accel(3)  in  this  mode are listed and the demo instructs to press
24       <Return> to start the demos.
25
26       If supported, all drawing operations are performed in the background.
27
28       Then the following tests are performed:
29
30   Positioning tests
31       These tests were originally intended to check that the accelerator com‐
32       mands  work on the proper screen locations. The screen shows 12 (4 x 3)
33       smaller areas with red crosses in the corners. When everything  is  ok,
34       the drawings should reach right in the corners of the crosses.
35
36       A  given  card may not support all operations listed here. In that case
37       the resp. test area just shows the red crosses.  For  tests  performed,
38       the  name  of  the  test is printed below the area. The tests are (from
39       left to right, top to bottom):
40
41
42       1.     A green box is drawn with vga_accel(ACCEL_FILLBOX).
43
44       2.     A cross of green lines is drawn with vga_accel(ACCEL_DRAWLINE).
45
46       3.     A linux pixmap just fitting  into  the  crosses  is  drawn  with
47              vga_accel(ACCEL_PUTIMAGE).
48
49       4.     A  pixmap  just  fitting  into the crosses is drawn into the red
50              crosses (by vgagl(5) which may or may not use the  accelerator).
51              The  pixmap  is  then copied to a few lines/columns below. Green
52              crosses mark the intended destination position.
53
54       5.     Works like 3. but copies to an area above the origin. The accel‐
55              erator  must  ensure  that the overlapping areas are handled non
56              corrupting. Thus, watch that the copy operation is properly per‐
57              formed.
58
59       6.     A  green  triangle  is  drawn above the top/left to bottom/right
60              diagonal by use of vga_accel(ACCEL_DRAWHLINELIST).
61
62       7.     Certain bitmaps are copied to the screen. In the corners  you'll
63              see the digits
64
65              0      top/left, green on red.
66
67              1      top/right, red on green.
68
69              2      bottom/left, black on white.
70
71              3      bottom/right,  white  on black. Note that some black bor‐
72                     der, not the digit will be aligned to the red crosses.
73
74              Finally, a yellow wizard image is drawn into the center.
75
76              The bit ordering for bitmaps is a bit weird. Please  check  that
77              the digits are not mirrored or flipped.
78
79       8.     This time bitmap transparency is tested by drawing wizard images
80              onto the aforementioned linux pixmap (left to right, top to bot‐
81              tom) in yellow, red, green, and cyan. The background of the yel‐
82              low wizard is masked out by a black border  bitmap.   Note  that
83              the  wizard will not reach into the red corners because the bit‐
84              map has some (transparent) border.
85
86       9.     The text below this box is copied as a  monochrome  bitmap  from
87              the screen into the corners listed under 7. in the same colors.
88
89       10.    Two  green  rectangles  with  an edge cut out from the bottom is
90              drawn using vga_accel(ACCEL_POLYLINE).Thereisanintendedbugwhich‐
91              drawsthecenterofthe top line twice. If supported, the lower rec‐
92              tangle is drawn in cyan and with the xor raster  operation  s.t.
93              the buggy point is not drawn thus leaving a pin hole.
94
95       11.    vga_accel(ACCEL_POLYHLINE)isusedtodrawsomegreenlineswhich‐
96              makesthisarealook like a green box with a cut out, black M-style
97              shape.
98
99       12.    A    weird    green    polygon    is    filled   in   red   with
100              vga_accel(ACCEL_POLYFILLMODE)  using  the  techniques  given  in
101              vga_accel(3).   This  needs some offscreen memory. If VGA memory
102              is tight in that resolution the test cannot be performed.
103
104       After this screen, you'll have to hit <Return> to continue.
105
106   Raster operations
107       Again, red cross bordered areas are drawn on the screen, this time  for
108       each  of  the  supported raster operations. For ROP_AND and ROP_XOR the
109       areas are filled in white first.
110
111       Three overlapping boxes A, B, C are drawn such that you see the follow‐
112       ing areas.
113
114       AAAAAAddddBBBBBB
115       AAAAAAddddBBBBBB
116       AAAAAAddddBBBBBB
117       AAAAeeggggffBBBB
118       AAAAeeggggffBBBB
119       AAAAeeggggffBBBB
120           CCCCCCCC
121           CCCCCCCC
122           CCCCCCCC
123
124       The pictures should show:
125
126       1.     Replace  mode.  A, B, C are red, green, blue. They just overlap,
127              yielding d - green and e, f, g - blue.
128
129       2.     The colors mix using ROP_OR (and a nice color table). The  over‐
130              lapping  areas  become  the  additive color mix: d - yellow, e -
131              magenta, f - cyan, and g - white.
132
133       3.     ROP_AND is used. The background  is  filled  white  first,  s.t.
134              there is something in video memory to and with non trivially. We
135              have A, B, C in cyan, magenta, yellow and d, e, f,  g  in  blue,
136              green, red, black.
137
138       4.     ROP_XOR is used and the background filled white first too. A, B,
139              C are red, green, blue again, but the overlapping areas d, e, f,
140              g  become blue, green, red, white.
141
142       5.     ROP_INV  is  used,  s.t.  A,  B,  C are all white and d, e, f, g
143              become black, black, black, white.  Note that this is  not  done
144              by  using  ROP_XOR and drawing A, B, C in white. Instead A, B, C
145              are drawn in the usual
146               red, green, blue. However, the  accelerator  just  inverts  the
147              memory contens.
148
149       If  the  accelerator supports raster operations for ACCEL_DRAWHLINELIST
150       actually disks (well, ellipses) are drawn instead of boxes.
151
152       After this screen, you'll have to hit <Return> to continue.
153
154
155   Replace QuixDemo
156       If ACCEL_DRAWLINE is supported, a Quix like bouncing series of lines in
157       varying colors is drawn. The lines are removed from the screen by over‐
158       drawing them in black, thus erasing the dots  and  text  on  the  back‐
159       ground.
160
161       The  test lasts about 5 seconds and some statistics are printed to std‐
162       out.
163
164
165   XOR Mode QuixDemo
166       As before, but this time all  lines  are  drawn  in  ROP_XOR  mode  (if
167       ACCEL_DRAWLINE  supports  raster  operations). Thus the background will
168       not be destroyed this time.
169
170       The test lasts about 5 seconds and some statistics are printed to  std‐
171       out.
172
173
174   FillBox Demo
175       The screen is ACCEL_FILLBOX filled with a series of boxes of increasing
176       colors.  In truei/high color modes you'll probably only see a series of
177       varying blue tones (because these are at the beginning of the color ta‐
178       ble and there are soo many of them).
179
180       The test lasts about 5 seconds and some statistics are printed to  std‐
181       out.
182
183
184   ScreenCopy Demo
185       Some  random dots are drawn on the screen and thirds of the screen con‐
186       tents are moved around using ACCEL_SCREENCOPY.
187
188       The test lasts about 5 seconds and some statistics are printed to  std‐
189       out.
190
191
192   Scroll Demo
193       Some  random  dots  are  drawn on the screen and moved one line up with
194       ACCEL_SCREENCOPY.  In offscreen memory a new  line  is  prepared  which
195       will  be  cleared  by ACCEL_FILLBOXandmoveinfrombelow.Thistestrequires‐
196       someoffscreenandwillnot be performed if video memory is very tight.
197
198       The test lasts about 5 seconds and some statistics are printed to  std‐
199       out.
200
201
202   FillBox with DrawHLineList Demo
203       Like the FillBox test, but no box fill is done but the screen is filled
204       with a list of horizontal lines drawn with ACCEL_DRAWHLINELIST.
205
206       The test lasts about 5 seconds and some statistics are printed to  std‐
207       out.
208
209
210   FillBox XOR Mode Demo
211       Like the FillBox test, but the XOR raster operation is used.
212
213       The  test lasts about 5 seconds and some statistics are printed to std‐
214       out.
215
216
217   PutBitmap Demo
218       The screen is filled with bitmasks consisting of  tiny  vertical  lines
219       alternating in red and blue.
220
221       The  test lasts about 5 seconds and some statistics are printed to std‐
222       out.
223
224

SOME DATAPOINTS

226       Here is a list of speed listings for some cards. Please  keep  in  mind
227       that  also the calling overhead for the program is measured. This seems
228       to be esp. true for the QuixDemo.
229
230
231   Results on a Cirrus GD5434-E with 2Mb:
232       640x480x256 60 Hz
233              FillBox: 200.3 Mpixels/s (200.3 Mbytes/s)
234              ScreenCopy: 51.0 Mpixels/s (51.0 Mbytes/s)
235              Scroll Demo: 50.5 Mpixels/s (50.5 Mbytes/s)
236              FillBox XOR: 83.2 Mpixels/s (83.2 Mbytes/s)
237
238       320x200x256 70 Hz
239              FillBox: 200.1 Mpixels/s (200.1 Mbytes/s)
240              ScreenCopy: 52.3 Mpixels/s (52.3 Mbytes/s)
241              Scroll Demo: 51.2 Mpixels/s (51.2 Mbytes/s)
242              FillBox XOR: 87.1 Mpixels/s (87.1 Mbytes/s)
243
244       640x480x32K 60 Hz
245              FillBox: 90.9 Mpixels/s (181.8 Mbytes/s)
246              ScreenCopy: 23.1 Mpixels/s (46.3 Mbytes/s)
247              Scroll Demo: 23.0 Mpixels/s (46.1 Mbytes/s)
248              FillBox XOR: 37.2 Mpixels/s (74.5 Mbytes/s)
249
250       640x480x16M (32-bit) 60 Hz
251              FillBox: 35.5 Mpixels/s (142.3 Mbytes/s)
252              ScreenCopy: 9.3 Mpixels/s (37.3 Mbytes/s)
253              Scroll Demo: 9.2 Mpixels/s (37.1 Mbytes/s)
254              FillBox XOR: 14.6 Mpixels/s (58.6 Mbytes/s)
255
256
257   On a Cirrus Logic 5426 VLB (50 MHz MCLK):
258       640x480x256 60 Hz
259              FillBox: 32.8 Mpixels/s (32.8 Mbytes/s)
260              ScreenCopy: 16.4 Mpixels/s (16.4 Mbytes/s)
261              Scroll Demo: 16.3 Mpixels/s (16.3 Mbytes/s)
262              FillBox XOR: 16.5 Mpixels/s (16.5 Mbytes/s)
263
264       640x480x32K 60 Hz
265              FillBox: 12.2 Mpixels/s (24.4 Mbytes/s)
266              ScreenCopy: 6.1 Mpixels/s (12.2 Mbytes/s)
267              Scroll Demo: 6.0 Mpixels/s (12.1 Mbytes/s)
268              FillBox XOR: 6.1 Mpixels/s (12.2 Mbytes/s)
269
270
271   Tweaked to 60 MHz MCLK:
272       640x480x256 60 Hz
273              FillBox: 42.1 Mpixels/s (42.1 Mbytes/s)
274              ScreenCopy: 21.0 Mpixels/s (21.0 Mbytes/s)
275              Scroll Demo: 20.9 Mpixels/s (20.9 Mbytes/s)
276              FillBox XOR: 21.1 Mpixels/s (21.1 Mbytes/s)
277
278       640x480x32K 60 Hz
279              FillBox: 16.7 Mpixels/s (33.5 Mbytes/s)
280              ScreenCopy: 8.3 Mpixels/s (16.7 Mbytes/s)
281              Scroll Demo: 8.3 Mpixels/s (16.7 Mbytes/s)
282              FillBox XOR: 8.3 Mpixels/s (16.7 Mbytes/s)
283
284   Results on a Mach32 EISA with 2Mb VRAM:
285       1280x1024x256 60 Hz
286              Replace QuixDemo: 12.1 Klines/s (6.7 Mpixels/s or 6.7 Mbytes/s)
287              Xor QuixDemo: 9.9 Klines/s (5.1 Mpixels/s or 5.1 Mbytes/s)
288              FillBox: 75.4 Mpixels/s (75.4 Mbytes/s)
289              ScreenCopy: 26.4 Mpixels/s (26.4 Mbytes/s)
290              Scroll Demo: 28.7 Mpixels/s (28.7 Mbytes/s)
291              FillBox with DrawHlineList: 73.1 Mpixels/s (73.1 Mbytes/s)
292              FillBox XOR: 37.9 Mpixels/s (37.9 Mbytes/s)
293              PutBitmap: 15.6 Mpixels/s (15.6 Mbytes/s)
294
295
296       1024x768x64K 72Hz
297              Replace QuixDemo: 12.3 Klines/s (5.2 Mpixels/s or 10.5 Mbytes/s)
298              Xor QuixDemo: 9.0 Klines/s (5.1 Mpixels/s or 10.3 Mbytes/s)
299              FillBox: 37.6 Mpixels/s (75.2 Mbytes/s)
300              ScreenCopy: 13.2 Mpixels/s (26.4 Mbytes/s)
301              Scroll Demo: 13.2 Mpixels/s (26.4 Mbytes/s)
302              FillBox with DrawHlineList: 37.0 Mpixels/s (74.0 Mbytes/s)
303              FillBox XOR: 18.9 Mpixels/s (37.8 Mbytes/s)
304              PutBitmap: 15.2 Mpixels/s (30.5 Mbytes/s)
305
306
307       You're encouraged to send in more data.  This demo is part  of  svgalib
308       and  can  be  found  in the demos/ subdirectory of the original svgalib
309       distribution. However, it is not installed in the  system  by  default,
310       s.t.  it is unclear where you can find it if your svgalib was installed
311       by some linux distribution. Even then, when you have the demo  on  your
312       system,  you probably won't have the sources s.t. it is only of limited
313       use for you.
314
315       In case of any such problem, simply get an  svgalib  distribution  from
316       the  net.  You  even  don't need to install it. Just make in the demos/
317       subdirecty. As of this writing,  svgalib-1.2.12.tar.gz  is  the  latest
318       version   and   can   be  retrieved  by  ftp  from  sunsite.unc.edu  at
319       /pub/Linux/libs/graphics and tsx-11.mit.edu at  /pub/linux/sources/libs
320       which will most probably be mirrored by a site close to you.
321
322

SEE ALSO

324       svgalib(7),   vgagl(7),   libvga.config(5),   vga_accel(3),  threed(6),
325       bg_test(6),    eventtest(6),    forktest(6),    fun(6),     keytest(6),
326       mousetest(6),   scrolltest(6),   speedtest(6),  spin(6),  testaccel(6),
327       testgl(6), testlinear(6), vgatest(6), plane(6), wrapdemo(6)
328
329

AUTHOR

331       This manual page was edited  by  Michael  Weller  <eowmob@exp-math.uni-
332       essen.de>.  The demo and most of its documentation is due to Harm Hane‐
333       maayer <H.Hanemaayer@inter.nl.net>.
334
335
336
337Svgalib (>= 1.2.11)              29 July 1997                         accel(6)
Impressum