Bug 55149 - Mesa fails to optimize pow(x, vec3(3.0)) where x is a vec3.
Summary: Mesa fails to optimize pow(x, vec3(3.0)) where x is a vec3.
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: 8.0
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: i965-perf
  Show dependency treegraph
 
Reported: 2012-09-20 15:00 UTC by Samuel Rødal
Modified: 2018-08-15 21:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Samuel Rødal 2012-09-20 15:00:18 UTC
Changing this code to x * x * x gives a noticable performance increase on an r600.

Is this something mesa could automatically optimize?
Comment 1 Samuel Rødal 2012-09-20 15:18:18 UTC
Example change from real-world code:

     1.7 -  if saVolume in attr then fragment+='vec3 norm2 = max(pow((abs(normalize(norm))-0.2)*7.0, vec3(3.0, 3.0, 3.0)), 0.0);norm2 /= dot(norm2, vec3(1.0, 1.0, 1.0));';
     1.8 +  if saVolume in attr then fragment+='vec3 tmpn = (abs(normalize(norm))-0.2)*7.0; vec3 norm2 = max(tmpn*tmpn*tmpn, 0.0);norm2 /= dot(norm2, vec3(1.0, 1.0, 1.0));';
Comment 2 Eero Tamminen 2018-07-11 08:16:27 UTC
(In reply to Samuel Rødal from comment #0)
> Changing this code to x * x * x gives a noticable performance increase on an
> r600.
> 
> Is this something mesa could automatically optimize?

Samuel, your bug is really old, from 2012, is this still an issue?
Comment 3 Dylan Baker 2018-08-15 21:24:07 UTC
The bug may well exist, or it might be fixed by SB. The bug is 6 years old and the original reporting isn't responding. Closing.


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.