- December 13, 2011 at 5:47 pm #30712
I’m trying to generate a mipmap from a FBO render target on the Nokia N9 (SGX530). Generating a mipmap from a texture uploaded into video memory works, but binding a texture that has been rendered to via a FBO and calling glGenerateMipmap() fails with a segmentation fault.
Since this works on a linux PC with GLES2 emulation, I’m guessing it’s a driver bug. It has already been reported  and filed under “BRN33822” (I can’t find any bug tracker around here, though). Texture size is 512×512. Uploading dummy data instead of passing NULL to glTexImage2D() or changing the filter modes, when setting up the render target, didn’t help.
Has there been any advancment on this issue?
$ cat /proc/pvr/version
Version 220.127.116.114 (release)
System Version String: SGX revision = 1.2.5December 14, 2011 at 9:14 am #35325
This issue has been fixed in our DDK, but is unlikely to filter down to the Nokia N9 any time soon (it’s up to OEMs to update their drivers and this is out of our control unfortunately).
However, there is a simple work around you can do – if you set the minification filter for the texture to involve MIP Maps right from the start, the driver should ensure it sets up MIP Maps correctly. So for example:
and then using this texture in your FBO and generating MIP Maps should get around the problem. I’ll update the original post so that future developers can see this as well.
TobiasDecember 14, 2011 at 11:11 am #35326
Great! That worked! But to be more precise: setting the GL_TEXTURE_MIN_FILTER anytime after allocating the texture and its MIP map again, also produces a segementation fault. So if you want renderable MIP maps, it must be and can only be set in advance to allocation.December 14, 2011 at 11:49 am #35327
Glad that got it working for you! You’re right – it needs to be before the texture allocation (glTexImage2D etc.) sorry that wasn’t clear 🙂
TobiasJuly 23, 2012 at 7:42 pm #35328
What version of the driver has the fix? Is there a way I can use a combination of glGetString(GL_VENDOR) and glGetString(GL_VERSION) to check? In other words, does the value returned by GL_VERSION generally correspond to an internal IMG version number?
JamesJuly 27, 2012 at 11:16 am #35329
Sorry it’s taken so long to get back to you – as far as I can tell this only happens on some 1.5 and earlier drivers. Any 1.6 drivers that have shipped should be fine.
You should be able to get the vendor string and version string to give you useful information, but some of our OEMs choose to hide this information from the user, so you’ll just have to try it and see what you get. The GL_VERSION should contain something along the lines of “1.6.16.nnnn”, if the VENDOR string contains “Imagination Technologies”.