Wrong mipmap level is chosen when TEXTURE_MAX_LEVEL=0
Submitted by Ruslan Kabatsayev
Assigned to Ian Romanick
Created attachment 126103 Test case
In the attached example TEXTURE_MAX_LEVEL is set to 0, then the texture is filled in by an FBO, and after that it's rendered on a window, scaled down in NEAREST_MIPMAP_NEAREST mode. But instead of choosing level 0 (since it's the maximum set for the texture), apparently some other level is chosen: it's visible by antialiasing-like blurriness on the borders of the triangle drawn in the texture. This reproduces on i915G Express chipset as well as on Intel Atom N550 integrated graphics.
Attachment 126103, "Test case":