Bug 12191 - ARB_vertex_program's LG2 directive is imprecision
Summary: ARB_vertex_program's LG2 directive is imprecision
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: lowest trivial
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-27 19:43 UTC by WuNian
Modified: 2009-08-24 12:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test case (2.11 KB, text/plain)
2007-08-27 19:44 UTC, WuNian
Details

Description WuNian 2007-08-27 19:43:38 UTC
The calculation of LG2 directive is imprecision. For example, 

PARAM LG2const =  { 1.300000, 1.500000, 1.700000, 9.900000 };
LG2 otex, LG2const.x;

Value of otex will be 0.37000.
The precision value should be log(1.3)/log(2)=0.3785.
It seems LG2 always reserve 2 number after decimal point.
Comment 1 WuNian 2007-08-27 19:44:02 UTC
Created attachment 11303 [details]
test case
Comment 2 Brian Paul 2007-08-28 14:36:31 UTC
The LOG2() function in imports.h is responsible for this.  If anyone finds a case where LOG2() accuracy is really important we can use log(x) / log(2) instead.
Comment 3 Adam Jackson 2008-02-24 18:22:38 UTC
Mass reopen.  The "LATER" resolution is lame, I'm deleting it.  Consider LATER to have arrived.
Comment 4 Shuang He 2009-06-03 18:54:50 UTC
This issue has gone
Comment 5 Shuang He 2009-06-03 18:55:17 UTC
verified against:
mesa: (master)0e8a5a84742adf6e99236f246c77325fad174204
Comment 6 Adam Jackson 2009-08-24 12:27:54 UTC
Mass version move, cvs -> git


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.