Created attachment 115209 [details] dmesg System Environment: -------------------------- Regression: yes Platform: HSW kernel: drm-intel-nightly: 5ea91de4ff45adb60031853d64314c3405378fbd(2015-04-15) commit c2a0600d5b0645533ba442b5ab879b23c2564a4d Author: Kenneth Graunke <kenneth@whitecape.org> Date: Thu Apr 9 23:26:49 2015 -0700 i965: Don't set NirOptions for stages that will use the vec4 backend. We've started using NirOptions != NULL to mean "we're using NIR for this stage." However, when INTEL_USE_NIR=1, we set it for a bunch of stages that still use the vec4 backend, and thus definitely aren't using NIR. For example, if INTEL_USE_NIR=1 we disable the GLSL IR cubemap normalization pass, even for vertex shaders and geometry shaders. This is wrong, but breaks a very uncommon case. When I started deleting GLSL IR for stages where we claimed to be using NIR, this bug quickly became apparent. For now, only set it for fragment shaders, and vertex shaders if brw->scalar_vs is set. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Bug detailed description: ----------------------------- case OglDrvShComp_6 was found performance decrease from 1.03 to 0.82 Reproduce steps: --------------------------- run OglDrvShComp_6 on different commit of Mesa and check the performance difference.
Created attachment 115210 [details] xorg log
Heng, is the given 10-20% shader compiler slowdown only from "i965: Don't set NirOptions for stages that will use the vec4 backend" commit, or total speed difference for larger set of changes?
(In reply to Eero Tamminen from comment #2) > Heng, is the given 10-20% shader compiler slowdown only from "i965: Don't > set NirOptions for stages that will use the vec4 backend" commit, or total > speed difference for larger set of changes? Sorry for incorrect bisect result: d47405eb707b9921f70454049677a9d504ee3fa6 is the first bad commit commit d47405eb707b9921f70454049677a9d504ee3fa6 Author: Jason Ekstrand <jason.ekstrand@intel.com> Date: Fri Apr 10 16:24:11 2015 -0700 i965: Use NIR by default for fragment shaders GLSL IR vs. NIR shader-db results on i965: total instructions in shared programs: 2889747 -> 2890782 (0.04%) instructions in affected programs: 2425446 -> 2426481 (0.04%) helped: 3698 HURT: 5341 GLSL IR vs. NIR shader-db results on g4x: total instructions in shared programs: 2547252 -> 2550440 (0.13%) instructions in affected programs: 1984482 -> 1987670 (0.16%) helped: 2844 HURT: 4776 GLSL IR vs. NIR shader-db results on Iron Lake: total instructions in shared programs: 4053381 -> 4063828 (0.26%) instructions in affected programs: 3026601 -> 3037048 (0.35%) helped: 4110 HURT: 8331 GAINED: 1287 LOST: 9 GLSL IR vs. NIR shader-db results on Sandy Bridge: total instructions in shared programs: 5307041 -> 5236666 (-1.33%) instructions in affected programs: 3442908 -> 3372533 (-2.04%) helped: 11829 HURT: 5604 GAINED: 33 LOST: 18 GLSL IR vs. NIR shader-db results on Ivy Bridge: total instructions in shared programs: 4926333 -> 4857017 (-1.41%) instructions in affected programs: 3144042 -> 3074726 (-2.20%) helped: 11559 HURT: 4774 GAINED: 46 LOST: 25 GLSL IR vs. NIR shader-db results on Bay Trail: total instructions in shared programs: 4926333 -> 4857017 (-1.41%) instructions in affected programs: 3144042 -> 3074726 (-2.20%) helped: 11559 HURT: 4774 GAINED: 46 LOST: 25 GLSL IR vs. NIR shader-db results on Haswell: total instructions in shared programs: 4392487 -> 4293476 (-2.25%) instructions in affected programs: 2800180 -> 2701169 (-3.54%) helped: 13073 HURT: 3383 GAINED: 46 LOST: 23 GLSL IR vs. NIR shader-db results on Broadwell (FS only): total instructions in shared programs: 4378113 -> 4283025 (-2.17%) instructions in affected programs: 2743209 -> 2648121 (-3.47%) helped: 12470 HURT: 3609 GAINED: 64 LOST: 27 Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> :040000 040000 056467d1b76d9b6d84041be3994abf5acc976caf 450c58fbecf671fef84ed91ca5999432e024a19d M src
NIR was known to slow down Mesa shader compilation (further, from drop documented in bug 86140) and this slowdown was already accepted as NIR is pre-condition for further compiler optimizations. NIR compilation speed was optimized a bit in early May, but it is still slower than before NIR.
Such is the nature of doing additional work.
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.