<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Incorrect texture filtering when using GL_LINEAR_MIPMAP_LINEAR"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94882">94882</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect texture filtering when using GL_LINEAR_MIPMAP_LINEAR
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>11.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Mesa core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>peter.fiss@gmx.de
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=122847" name="attach_122847" title="source code">attachment 122847</a> <a href="attachment.cgi?id=122847&action=edit" title="source code">[details]</a></span>
source code
I had an issue with texture filtering in one of my apps. So I decided to write
a minimal sample program, which can reproduce the issue. You can find it in the
tar.xz archive attached to this bug report.
The program creates a 512x512 texture which is completely white, except for the
outermost 8 pixels, which are black. The fragment shader renders the texture as
if a light was projecting it from the side (see attached screenshots).
The resulting picture is different depending on the graphics driver and
glTexParameter settings. If GL_TEXTURE_MIN_FILTER is set to GL_LINEAR or
GL_NEAREST, everything looks fine, no matter which driver is used. The
resulting picture looks like nvidia.png.
However, when using GL_LINEAR_MIPMAP_LINEAR, there is a ~1 pixel wide border
around the projected texture. This happens on all tested drivers except the
proprietary nvidia driver on Windows. This is actually strong evidence that
there's something wrong with my program instead of the drivers, but I really
couldn't figure it out and the program is not that complicated.
The white border gets smaller when GL_TEXTURE_WRAP_* is set to
GL_CLAMP_TO_BORDER instead of GL_CLAMP_TO_EDGE or GL_REPEAT. It's still wrong
though. Make sure to view the screenshots unscaled and unfiltered, otherwise
you might not see it.
Tested platforms:
- Intel HD 4000 (Ivy Bridge Mobile) with Mesa 11.2.0-1 on Arch
- GeForce GT 640M with Mesa 11.2.0-1 on Arch
- Radeon HD 5670 with Mesa 11.1.2-1 on Manjaro
- the same 3 GPUs with their proprietary drivers on Windows 7
Since all tested Mesa drivers have the issue, I decided to post this in the
mesa core section. I hope this is correct. If you can confirm, that this is a
driver bug, I will write bug reports to the closed-source teams of AMD and
Intel as well.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>