Hi !
> 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 ?
> 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.
This is correct. It does return
return -E(ACCEL,NOSUP_ALWAYS_MMAP);
or similar which is a bitfield-like error code that gives more hints on what
to do if it fails than a plain -1 would do.
Oh - wait, you don't talk about errno, but about the ioctl retval - 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 ?
Though the correct value to return would be: return -E(ACCEL, NOSUP_ALWAYS_MMAP);
> The second problem, is that I couldn't find in these ACCEL ioctl's
> any command to change color for hw accel drawing.
> 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.
> 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 ?
CU, ANdy
--
= Andreas Beck | Email : <[EMAIL PROTECTED]> =