Re: Is this a texture paging problem?

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.engr.sgi.com)
Mon, 9 Jun 1997 00:14:29 -0700


+>---- On Jun 8, 4:34pm, Allan Schaffer wrote:
> Subject: Re: Is this a texture paging problem?
->>
->> So now the question becomes, why is a 4MB image file taking up 16MB of
->> texture memory? Is it because my grayscale image is being duplicated in
->> the red, green, blue, and alpha bands? If so, I guess cutting it down in
->> smaller chunks will help.
->
->The routine 'pfuGetTexSize' in libpfutil/tex.c is calculating that
->this texture uses 4 bytes (32 bits) per texel. It does this
->calculation depending on the PFTEX_INTERNAL_FORMAT.
->
->So I'd guess this texture has an internal format of PFTEX_IA_12. You
->should be able to modify this in your modeller. Change it to the
->equivalent of PFTEX_I_8.
->
->On RE and IR, textures are stored internally with either 16, 32, or
->48 bits per texel.[*] If your texture is smaller than these you can
->specify various packing styles via the pfTexEnv.
->
->Allan
->[*] According the code there seems to also be a format PFTEX_RGB_12
-> which uses 4.5 bytes per pixel, which I was not aware]

Note that you can pass through _any_ GL token for that
internal format, not just PFTEX_ tokens. If you look at
opengl.h and irisgl.h you'll know that our tokens are just
covers for the GL tokens which is exactly why separate compiles
are needed for OpenGL and IRIS GL. However, this gives you
maximum performance and guarantees that Performer won't limit you
from new stuff.
However, if you pass in a token that we do not recognize, we can't
automatically do smart defaults for other tightly coupled formats (such
as EXTERNAL format and IMAGE format) so you then have to
set everything yourself.

Finally, pfuGetTexSize() (in src/lib/libpfutil/tex.c) is only as
accurate as its switch statement which doesn't have everything and old
versions of Performer won't necessarily know about new later
tokens that get added. The default assumption for unknown tokens
is 4 bytes/texel which is usually correct. We could also print a DEBUG
warn in future versions when we see a token that we don't know so that
at least you'd get a hint of what happened.

src.

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com  (415) 933 - 1002  FAX: (415) 965 - 2658  MS 8U-590
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com
   SGI DevForum 97 info:  http://www.sgi.com/Forum97/

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:24 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.