Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Wed, 02 Jun 1999 08:23:33 +0000

Re: GGIMesa updates/questions

Jon M. Taylor wrote:
> * The new display/ subsystem is in place and integrated into the
> build/install system.  Currently it only contains kgi-savage4.c because
> there are no other accelerated GGIMesa targets in existence yet.

Hmm, wonder if one could hook up the glide target with GGIMesa and
Mesa3DFX...

>         Questions:
> 
> * I cannot seem to get kgi-savage4.so to be used by GGIMesa.  ggimesa.conf
> maps 'display-fbdev-mesa' to the .so correctly (well it is a hack but...), so
> kgi-savage4.so does get loaded and its ggi_dlinit() function is called
> properly as well.  However, in spite of the fact that display-fbdev-mesa is
> the last line in ggimesa.conf, ggiGetAPI() apparently insists on loading it
> _first_, before generic-stubs-mesa and friends.  The end result is that the
> GGIMesa private function pointers, which were initially set correctly by
> kgi-savage4.so, get reset to the stub routines immediately afterward.  No
> other extension implements both default/ and display/ subsystems, so I
> have no example to look at in this situation.

After a quick look at things it's obvious that we need to make the
API lists more flexible. For example it is desirable to have extensions
being able to add APIs which LibGGI itself does not know or need to know
about.

I propose we make the API list a property of the visual (not the target
as now, but the list is still initialized by the target at setmode time)
and add a new internal function:
_ggiAddAPI(ggi_visual_t vis, const char *api):

Also when you look at a target, for example do_setmode() in
display/fbdev/mode.c, you'll see that display/fbdev.so actually
implements an API which comes after all the generic ones.
(I'm refering to the lines:
	vis->opdraw->setorigin = GGI_fbdev_setorigin;
	vis->opdraw->setdisplayframe = GGI_fbdev_setdisplayframe;
if that isn't clear.)

So the complete API list after the fbdev target is loaded on a kgicon
driver would look like:
display-fbdev
generic-stubs
generic-color
generic-linear-*
tgt-fbdev
tgt-fbdev-kgicon-generic

and when GGIMesa is attached display-fbdev-mesa would detect the
presence of a Savage3D and add tgt-fbdev-kgicon-s3-savage3d to
the API list.

Comments? Andy?

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

Index: [thread] [date] [subject] [author]