Brian, I found the problem. There was another but related bug that affected the first level texture only. I can't believe I missed it.
To make sure I get this right I want to expand the test program you gave me to cover all possible data types and test bitmaps and 1D and 3D textures as well. I think this is a good idea since all these cases are handled in separate code and as a result the bugs occur in each case. I will hopefully finish this in a couple of days. -Greg On Mon, 2006-10-23 at 09:51 -0600, Brian Paul wrote: > Greg McGarragh wrote: > > Hello, > > > > I think I found two bugs in src/glu/sgi/libutil/mipmap.c. They are > > actually two bugs that show up in several places. I've attached a patch > > that fixes them. I realize that the GLU used in Mesa is from SGI so I > > am not sure if reporting the bug on this list is appropriate. If not > > could somebody please tell me where to report it. > > Reporting it here is fine. I've send GLU fixes upstream to SGI in the > past but they seem to go into a black hole. > > > > The first bug emerges when calling gluBuild2DMipmaps when the texture > > dimensions are both powers of two and GL_UNPACK_ROW_LENGTH is larger > > than the width of the input image (as would be the case if one is > > building a texture from a subimage of a larger image). The problem is > > in the halveImage_*() functions where the pointer 't' is not properly > > positioned to the beginning of each row before looping over the pixels > > in a row. Interestingly this is handled correctly in the functions > > halve1Dimage_*(), halveImageSlice(), and halveImage3D(). > > > > The second bug emerges when calling gluBuild3DMipmaps when the texture > > dimensions are all powers of two and GL_PACK_IMAGE_HEIGHT is larger than > > the height of the input image. The problem is in halveImageSlice() and > > halveImage3D() where the pointer 't' is not properly positioned to the > > beginning of each image before looping over the rows in an image. > > I think there's at least one more bug. The attached test program > builds a 256x256 texture image within a 500x500 image buffer. The row > stride seems to be miscomputed. > > Could you look into fixing that too? Otherwise, I probably can in a > day or two. > > -Brian ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
