Nir Radian wrote:
> Hello,
> 
>  
> 
> I came across this part of the code in s_texfilter.c when trying to
> debug a glitch in the texture application -
> 
>  
> 
>    /* DEBUG CODE: Verify that lambda[] is monotonic.
> 
>     * We can't really use this because the inaccuracy in the LOG2 function
> 
>     * causes this test to fail, yet the resulting texturing is correct.
> 
>     */
> 
>    if (n > 1) {
> 
>       GLuint i;
> 
>       printf("lambda delta = %g\n", lambda[0] - lambda[n-1]);
> 
>       if (lambda[0] >= lambda[n-1]) { /* decreasing */
> 
>          for (i = 0; i < n - 1; i++) {
> 
>             ASSERT((GLint) (lambda[i] * 10) >= (GLint) (lambda[i+1] * 10));
> 
>          }
> 
>       }
> 
>       else { /* increasing */
> 
>          for (i = 0; i < n - 1; i++) {
> 
>             ASSERT((GLint) (lambda[i] * 10) <= (GLint) (lambda[i+1] * 10));
> 
>          }
> 
>       }
> 
>    }
> 
>  
> 
> I’ve encountered a situation where lambda drops below zero during a
> non-monotonic span and the results are disastrous and not “yet the
> resulting texturing is correct“ !

lambda < 0 is nothing unusual.  It indicates texture magnification.


> Has anyone seen something like this?
> 
> Thank you…
> 
>  
> 
> Btw – My name is nir, and I’m working on linux-opengl-HW compatibility
> tests, and am using MESA as reference code – I came upon this when
> trying to mipmap between bitmaps of solid color and see blue where red
> should be J If u need code examples call me up.

If you can provide a small test case I'll take a look.

-Brian

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to