Bug 28558 - glGenerateMipmap doesn't work depending on the texture size on Intel DRI
Summary: glGenerateMipmap doesn't work depending on the texture size on Intel DRI
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2010-06-15 10:58 UTC by Neil Roberts
Modified: 2010-09-01 03:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Simple test case (4.39 KB, text/x-csrc)
2010-06-15 10:58 UTC, Neil Roberts
Details

Description Neil Roberts 2010-06-15 10:58:07 UTC
Created attachment 36298 [details]
Simple test case

glGenerateMipmap seems to fail in different ways depending on the size of the texture:

With 256x256 and 255x255 it works fine

With 254x254 it seems to leave the mipmap levels black (but it still thinks it's filled them in so it will let you draw)

With 252x252 it causes an assertion failure.

This is tested with 726f18ee695 (current git master)
Comment 1 Neil Roberts 2010-06-15 11:11:32 UTC
Just noticed this is also in the piglit test fbo-generatemipmap-npot which is also failing for me.
Comment 2 Eric Anholt 2010-06-16 11:56:34 UTC
Works for me on Ironlake and 945GM with mesa master or 7.8.  We did fix a bug in this in the last few months, are you sure you had the right drivers?  What hardware are you on?
Comment 3 Neil Roberts 2010-06-17 04:48:31 UTC
(In reply to comment #2)

This is on i965 in my X61s. I'm pretty sure it's picking up the freshly built git Mesa DRI driver. Sure enough the problem isn't there on my i945 netbook.
Comment 4 Eric Anholt 2010-08-31 11:32:15 UTC
Pretty sure you were just seeing a stale driver.  It's clearly fixed for me from 7.7 -> 7.8/master.  LIBGL_DEBUG=verbose can help in finding if you're getting the right driver.
Comment 5 Neil Roberts 2010-09-01 03:34:33 UTC
I am still seeing this bug in git master (c3c25a7ab85). Both my attached test case and the test case in Piglit fail. If I run with LIBGL_DEBUG I get:

neil☺neilpc:~/c$ LIBGL_DEBUG=verbose ~/c/mesa-dri/env.sh ./test-mipmap
libGL: OpenDriver: trying /home/neil/local/mesa-dri/lib/dri/i965_dri.so
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/neil/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/neil/.drirc: No such file or directory.

And that file has a recent time stamp so I'm pretty sure it's the one I just built:

neil☺neilpc:~/c$ ls -tl /home/neil/local/mesa-dri/lib/dri/i965_dri.so
-rwxr-xr-x 1 neil neil 17789994 2010-09-01 11:09 /home/neil/local/mesa-dri/lib/d
ri/i965_dri.so

glxinfo also suggests that that is the case:

OpenGL renderer string: Mesa DRI Intel(R) 965GM GEM 20100330 DEVELOPMENT x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 7.9-devel

I also see the bug if I run with my distro's copy of Mesa which is 7.7.1.

I'm probably not using the latest X server or kernel driver so maybe that is the problem?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.