Bug 10907

Summary: GLSL built-in exp function not functioning correctly
Product: Mesa Reporter: James Burns <James.Burns>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium    
Version: 6.5   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description James Burns 2007-05-10 13:23:11 UTC
The GLSL exponential function does not generate the correct result.  Symptom - shader working on NV does not perform same on OSMESA.  The following line:

float f = exp(-k*gl_FogFragCoord);

was replaced with:

float f = pow(2.718281828, -k*gl_FogFragCoord);

After making the replacement, the shader performed correctly again.

Test codes have verified this problem.
Comment 1 Brian Paul 2007-05-10 13:50:38 UTC
Fixed in git.  Thanks, Jamie.
Comment 2 James Burns 2007-05-11 09:25:37 UTC
(In reply to comment #1)
> Fixed in git.  Thanks, Jamie.
> 

Tested fix in my application.   All works as expected.  Thanks so much!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.