Re: Urgent: OpenGL vs Performer Texture management
Phil Keslin (philk++at++cthulhu.engr.sgi.com)
Thu, 04 Mar 1999 09:34:25 -0800
Rob Jenkins wrote:
>
> Isabelle Lafon wrote:
> >
> > Hello everybody,
> >
> > This is more an openGL question than a Performer question.
> > But if someone could help us on this problem, it will be
> > very very appreciate.
> >
> > Our program has two modules: The first one is built with openGL;
> > the second one with Performer.
> > We are running on an Onyx InfiniteReality2 with 512 Mbytes Main Memory
> > and 64Mbytes Texture Memory.
> > The performer module is able to handle scene with 70Mb of Textures
> > without
> > complaining. But the openGL module, crashes in the glTexImage2D call
> > when
> > 64Mbytes of texture is reached. See the dbx stack at the end of the
> > mail.
> > The error message displayed is
> > ERROR: Failed Texture Manager Malloc -- Exiting
> >
> > What does performer relative to the texture memory management that
> > openGL do not ?
> >
>
> Performer is probably using OpenGL functions like
> glAreTexturesResident() and glPrioritizeTextures() to see what can fit
> in and also let low pri textures get unloaded. Performer may also be
> resuing texture memory space for different textures ( via
> glTexSubImage2D ), it would depend on the pfTexture settings you have.
> It's seem a bit hostile that the texture manager just bails on your
> OpenGL when it runs out of memory ( which is the cause of the error ), I
> think there's a request in to make it return GL_OUT_OF_MEMORY or
> something instead of exit(), that would be more friendly but not solve
> you problem. Can you implement some basic texture paging perhaps ?
> Currently your don't really know when you'll be paging ( or about to run
> out of memory ), if you defined some 'scratch pad' textures that you
> paged into with glTexSubImage2D and prioritise textures you can control
> the paging more. Do you really exit as soon as texture use >= 64Mb ? I'm
> not sure but I would expect the OS/GL to handle that case, just start
> paging. Do you have standard systune set up ? ( anything not default is
> listed in /var/sysgen/stune ) I *think* systune increase of
> gfxlockablemem could help this problem but I'd be very wary about
> messing with parameters like that too much, in short:
I'd like to clarify something. This error is generated when malloc fails
(not when you run out of texture memory). The OpenGL virtualizes texture
memory for multiple textures (as opposed to a single texture). It will
swap them as needed. There is something in your OpenGL application that
is oversubscribing your heap.
Although paging your own textures might help, its not likely that it
will fix this particular problem.
> You probably should make the OGL code manage texture usage and paging.
> You might be able to tune the system to avoid the exit, or, maybe you
> have hit a texture manager problem in patch 3543, can you emulate the
> OGL texture loading you do in a short test case ?
>
> What was it in the trace that made you think mip maps were being built ?
- Phil
--
Phil Keslin <philk++at++engr.sgi.com>
This archive was generated by hypermail 2.0b2
on Thu Mar 04 1999 - 09:34:31 PST