On Thu, Feb 9, 2012 at 1:07 PM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 02/09/2012 01:57 PM, Brian Paul wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/09/2012 12:15 PM, Anuj Phogat wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, Feb 9, 2012 at 11:02 AM, Ian Romanick <<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a><br>
<mailto:<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>>> wrote:<br>
<br>
On 02/09/2012 08:14 AM, Brian Paul wrote:<br>
<br>
Anuj,<br>
<br>
The patch you committed (15986d2), the first version you<br>
posted that tests:<br>
<br>
if (width < 2 * border || width > maxSize)<br>
return GL_FALSE;<br>
<br>
causes my copy of conform (mustpass.c / proxy texture test) to<br>
fail with<br>
swrast/softpipe/llvmpipe. It passes w/ NVIDIA's driver.<br>
<br>
I thought you were going to commit the patch that does:<br>
<br>
if (width < 2 * border || width > 2 * border + maxSize)<br>
return GL_FALSE;<br>
<br>
That allows conform to pass here.<br>
<br>
<br>
Allow me to remove the egg from my face. I dug a bit deeper into<br>
the test case that was previously failing and conform / mustpass.<br>
What I said before<br>
(<a href="http://lists.freedesktop.org/__archives/mesa-dev/2012-__February/018562.html" target="_blank">http://lists.freedesktop.org/<u></u>__archives/mesa-dev/2012-__<u></u>February/018562.html</a><br>
<br>
<<a href="http://lists.freedesktop.org/archives/mesa-dev/2012-February/018562.html" target="_blank">http://lists.freedesktop.org/<u></u>archives/mesa-dev/2012-<u></u>February/018562.html</a>>)<br>
<br>
was wrong. You and Jose were correct. Sorry.<br>
</blockquote>
<br>
No biggie.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Intel oglconform test case (max_values<br>
negative.textureSize.<u></u>textureCube) also passes with the patch i earlier<br>
posted as per Brian's comments:<br>
<a href="http://lists.freedesktop.org/archives/mesa-dev/2012-January/018410.html" target="_blank">http://lists.freedesktop.org/<u></u>archives/mesa-dev/2012-<u></u>January/018410.html</a><br>
<%20<a href="http://lists.freedesktop.org/archives/mesa-dev/2012-January/018410.html" target="_blank">http://lists.freedesktop.<u></u>org/archives/mesa-dev/2012-<u></u>January/018410.html</a>><br>
<br>
I'll make the required changes as per this patch.<br>
</blockquote>
<br>
Thanks, the test passes again. But I have a follow-up comment for the<br>
patch in question...<br>
</blockquote>
<br></div></div>
Actually, this isn't directly related to your patch- the issue is with texture borders and array textures.<br>
<br>
For a 1D texture array, the border only applies to the width. For a 2D texture array the border applies to the width and height but not the depth. We're not handling this correctly everywhere. For example, in _mesa_init_teximage_fields() we compute the 'Height2' field like this:<br>
<br>
if (height == 1) { /* 1-D texture */<br>
img->Height2 = 1;<br>
img->HeightLog2 = 0;<br>
}<br>
else {<br>
img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */<br>
img->HeightLog2 = _mesa_logbase2(img->Height2);<br>
}<br>
<br>
The else clause does the wrong thing if the texture is a 1D array texture with a border. Similarly for Depth2 and 2D array textures.<br>
<br>
Granted, borders are seldom used, but it would be good to go over all the teximage code and fix these mistakes.<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br>yes, i agree. I'll send out a separate patch to fix such cases in teximage code. </div>
</div><br>