From: Brian P. <br...@va...> - 2001-03-28 15:27:05
|
Gareth Hughes wrote: > > I'm restoring the behaviour of texImage->Format, and will set > texImage->IntFormat to the GL format corresponding to the internal Mesa > format instead of the internalFormat parameter given by the user. This > gives the behaviour I'm looking for (ie. users can find out what format > the texture is stored in, and by checking the individual component sizes > can acurately determine how the image is stored). > > As far as I can tell, the texImage->Type field is redundant. We have > the number of bytes per texel stored in texImage->TexFormat->TexelBytes, > and can thus remove the use of texImage->Type in texstore.c. We'll need > to keep the information around so the software rasterizer can determine > if it can use an optimize CHAN_TYPE texture sampling function. Thus, > I'll remove the BaseFormat field from gl_texture_format, but keep and > rename the BaseType field. The software rasterizer will then check the > gl_texture_format's Type field as required. In the s/w rasterizer I've been replacing the texture Format and Type checks with comparisons against the new MESA_FORMAT_* tokens. And in the texture-object-completeness function, I'm going to check if all mipmaps are of the same format by comparing the TexFormat field instead of the Format/Type fields. So, the Type field really might not be needed anymore. However, it wouldn't be bad to keep it around a bit longer, I think. -Brian |