On Tue, 7 Mar 2000, James Simmons wrote:
>
> > > I have been looking at Mesa-GGI and libGGI. Do you think it would be
> > > possible to add a triangle function?
> >
> > Yes, but the triangle function is added in an extension library
> > because the base LibGGI drawing functions are all basic 2D "essential"
> > primitives only. Currently the "triangle drawing" extension library which
> > most people use is of course GGIMesa, but LibGGI2D has triangle drawing
> > functions as well, and of course there is always LibGGI3D.
>
> Time to put GGImesa in standard tree
No way. We already have too much stuff in degas/ |->.
> or make a GGI3D extension?
Later. See my other posts on this subject.
> > > I'm interested in also setting up Z
> > > and alpha buffers. How would I go about doing that ?
> >
> > Depends on whether you are trying to simply allocate some RAM and
> > map it into a DirectBuffer, or whether you are trying to directly map a
> > hardware Z/alpha buffer. If the first is true, just use malloc() and look
> > at how e.g. the Glide target maps DirectBuffers, I think thats the best
> > example code for that. If the second is true and you are mapping a
> > hardware auxiliary buffer, you will either need to have a kernel driver
> > which can let userspace mmap() the physical aperture, or do some suid-root
> > /dev/mem mapping tricks like SVGAlib does.
>
> Neither.
> The SGI approach of not mmaping these buffers.
That's OK too, in fact it is necessary on some chipsets which do
not expose the auxiliary buffers directly at all. In this case, you'd
simply program the hardware appropriately to set up the buffers, and your
GGIMesa target code would need to inform Mesa that the buffers are
hardware accelerated but not directly mappable. I don't know if Mesa is
able to cope with this situation, but if not it needs to be fixed, and for
more than GGI. Also, your kernel driver code and the GGIMesa target code
will still need to map the z-buffer into a ggi_resource_t, as long as it
is necessary to serialize access to the z buffer.
> I rather set a
> flag to tell the system to use a particular buffer. Sort of what you did
> in GGIMesa if I'm seeing it right.
No, I never got into the Mesa internal buffer management _that_
deeply. It's been a while though, and Mesa has improved a lot since then.
Jon
---
'Cloning and the reprogramming of DNA is the first serious step in
becoming one with God.'
- Scientist G. Richard Seed