On 1999/Sep/29, Andreas Beck wrote:
> > I have found at last a way of using the KGIcon hardware
> > acceleration, I used the ACCEL IOCTL's that appear at
> > include/kgi/kgi_commands.h
>
> ? You aren't using LibGGI ?
As I said in another email, It's for coding Demos/Intros, I
shouldn't use any library not coded by me for this stuff.
But I (and all the GGL development team) use LibGGI for the GGL
library, which is genaral multimedia purpose, not only demos and intros :))
> > But I found two problems, the first, is that when I call an ioctl
> > command which isn't supported by the hardware (circles on my S3 Virge, in
> > example) the ioctl call doesn't return -1.
>
> Oh - wait, you don't talk about errno, but about the ioctl retval - right ?
right.
> That should be -1, right. This seems to be a bug in the virge driver, then.
> Wait ... hmm - the driver seems o.k. ...:
>
> case ACCEL_DRAWCIRCLE:
> return -E(ACCEL, BOGUS);
>
> strange. Could you try to track that ? strace, printk and friends ?
#hline:
ioctl(3, 0x400c0514, 0xbffffc3c) = 0
#circle:
ioctl(3, 0x400c0530, 0xbffffc3c) = -83886082
> > Can anybody tell me how can I change color, please?
>
> *grin* - yes. Mmap the GC (this is a crossmapped piece of kernel memory that
> both user- and kernelspace can see) and just write the color there.
> This is done for efficiency reasons. If you do a lot of SW-drawing, it would
> be a major waste to call into the kernel for every change of drawing color.
Yes, I understand... thanks.
> > The virge acceleration is REALLY cool, in my machine, using very
> > optimized 2D rutines, the performance increases using the Virge HW accel
> > like this:
> > - lines: 20%
> > - boxes: 74%
> > - hlines: 64%
>
> Only ? Usually one gains more. How were those measured ?
As I said before, the CPU is PII 333 Mhz. If you want the exact
proofs, here are:
* lines: 1.000.000 placed pseudo-randomly with pseudo-ramdom lengths
-SW: Bresenham algorithm, all with integers, you know: 34.68 seconds
-HW: 27.58 seconds
* boxes: 10.000 paced the same way as lines
-SW: double loop (compiled with -O3): 25.83 seconds
-HW: 6.80 seconds
* Hlines: 3.000.000 with y coordinate and length pseudo random
-SW: simple loop (-O3 again): 32.09 seconds
-HW: 11.46 seconds
* Vlines: 3.000.000 with x coordinate and length pseudo random
-SW: simpe loop (-O3): 87.95 seconds
-HW: 76.64 seconds
The pseudo random algorith is really a deterministic algorithm over
the loop variable (with modules and sums) that ensures size of al objects
varying between maximun and minimun (0) posible sizes and ensures that the
program always draws the same things both in SW and HW.
--
Come to GPUL <http://ceu.fi.udc.es/GPUL>
_
/_) \/ / / email: mailto:[EMAIL PROTECTED]
/ \ / (_/ www : http://programacion.mundivia.es/ryu
[ GGL developer ] & [ IRCore developer ] & [ GPUL member ]