On Tue, 5 Oct 1999, Jos Hulzink wrote:

> Hi
> 
> Wondering:
> 
> When a certain mode CAN do hardware 3D, it is not always needed. For
> example, if someone only runs normal X, or a 2D game like starcraft, he
> doesn't need a Z Buffer, and the Z Buffer space could better be used for
> other things.

        Sure.
 
> It seems to me that the accelleration driver should decide that the Z
> Buffer must be setup as soon as the first 3D call is made. But in Jons
> approach, memory management seems to be done in the Chipset driver. In my
> head, a "what belongs where" problem is playing around.

        What determines whether or not you want to map a zbuffer is not
the use of 3D in general - occasionally, it makes sense to draw 3D
triangles without using a Z or W buffer.  Example: when you have already
clipped in software and do not wish to slow down the hardware by forcing a
z-test when none is necessary.

        What should determine whether or not any type of auxiliary buffer
is mapped, is whether the user API requests such a buffer.  In this case
the user API is GGIMesa, so when the Mesa device driver interface asks us
to map or allocate the buffer we must rely on our target code to map
hardware buffers if they are available, and gracefully fail if not.  If
not, Mesa will allocate its own buffers internally and we do not have to
worry about it anymore.
 
> I got setup for Z Buffer and friends in the Accelleration driver, and in
> my eyes, this works nice. So I wonder what is the right way to go.

        It should not matter how you implement this, as long as it is not
forced and as long as it will be possible for the userspace GGIMesa target
code to know what needs to be done.  Suggest-strings will allow the target
code to handle individual cases well, so I do not see this as a problem.
However, there is no point to do things differently if it is not
necessary, and it will make the target code simpler if we have less
special cases to deal with.  

        So, the bottom line is that you can structure your design however
you wish during testing and development, but be prepared to rework some of
your interfaces down the road.  I am sure that I will have to rework a lot
of Savage4 driver code myself....

Jon 

---
'Cloning and the reprogramming of DNA is the first serious step in 
becoming one with God.'
        - Scientist G. Richard Seed

Reply via email to