On Wed, Feb 1, 2012 at 12:52 PM, Jose Fonseca <span dir="ltr"><<a href="mailto:jfonseca@vmware.com">jfonseca@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"><br>
<br>
----- Original Message -----<br>
> On 01/28/2012 04:04 AM, Jose Fonseca wrote:<br>
> ><br>
> ><br>
> > ----- Original Message -----<br>
> >> width, height parameter of glTexImage2D() includes: texture image<br>
> >> width + 2 * border (if any). So when doing the texture size check<br>
> >> in _mesa_test_proxy_teximage() width and height should not exceed<br>
> >> maximum supported size for target texture type.<br>
> >> i.e. 1<< (ctx->Const.MaxTextureLevels - 1)<br>
> >><br>
> >> This patch fixes Intel oglconform test case: max_values<br>
> >> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=44970" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=44970</a><br>
> >><br>
> >> Note: This is a candidate for mesa 8.0 branch.<br>
> >><br>
> >> Signed-off-by: Anuj Phogat<<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
> >> ---<br>
> >> src/mesa/main/teximage.c | 22 +++++++++++-----------<br>
> >> 1 files changed, 11 insertions(+), 11 deletions(-)<br>
> >><br>
> >> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
> >> index d11425d..018aca0 100644<br>
> >> --- a/src/mesa/main/teximage.c<br>
> >> +++ b/src/mesa/main/teximage.c<br>
> >> @@ -1179,7 +1179,7 @@ _mesa_test_proxy_teximage(struct gl_context<br>
> >> *ctx, GLenum target, GLint level,<br>
> >> switch (target) {<br>
> >> case GL_PROXY_TEXTURE_1D:<br>
> >> maxSize = 1<< (ctx->Const.MaxTextureLevels - 1);<br>
> >> - if (width< 2 * border || width> 2 + maxSize)<br>
> >> + if (width< 2 * border || width> maxSize)<br>
> ><br>
> > Anuj,<br>
> ><br>
> > I may be missing something, but I'm still unsure about this,<br>
> > because this will create problems for drivers that do support<br>
> > borders.<br>
><br>
> AFAIK, the only desktop graphics hardware that ever supported borders<br>
> is<br>
> NVIDIA. Their driver follows the convention (width + 2 * border) <<br>
> maxSize, and their driver advertises a maximum size of 2^n. I tried<br>
> creating a proxy texture that was the full 2^n plus a border on their<br>
> closed-source Linux driver, and it was rejected. A proxy texture<br>
> 2^n-2<br>
> plus a border was accepted.<br>
><br>
> Based on that, I believe this patch is correct.<br>
<br>
</div></div>Fair enough. Sounds good to me then!</blockquote><div><br></div><div id="c5" class="bz_comment" style="margin-bottom:2em;background-color:rgb(255,255,255)"><pre class="bz_comment_text" id="comment_text_5" style="white-space:pre-wrap;width:50em">
<font class="Apple-style-span" face="'arial narrow', sans-serif">This patch made the intel oglconform test to pass. But the errors reported in
oglconform failure stays unfixed. This is confirmed by a piglit test case I developed to reproduce the errors. Test case (validate-texture-size) is posted on piglit mailing list for review.</font></pre><pre class="bz_comment_text" id="comment_text_5" style="white-space:pre-wrap;width:50em">
<font class="Apple-style-span" face="'arial narrow', sans-serif">Driver throws assertion failure or segfaults with large textures even much below the maximum supported size.</font></pre><pre class="bz_comment_text" id="comment_text_5" style="width:50em">
<span class="Apple-style-span" style="white-space:pre-wrap"><font class="Apple-style-span" face="'arial narrow', sans-serif"><a href="https://bugs.freedesktop.org/show_bug.cgi?id=44970">https://bugs.freedesktop.org/show_bug.cgi?id=44970</a></font></span></pre>
</div></div>