Summary: | [GLSL] fail to call long chains across shaders | ||
---|---|---|---|
Product: | Mesa | Reporter: | Gordon Jin <gordon.jin> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | medium | ||
Version: | 7.10 | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | new piglit test case |
Description
Gordon Jin
2011-02-12 01:09:38 UTC
Created attachment 43284 [details]
new piglit test case
After quite a bit of digging, I believe the root cause is in the linker. I'm not sure what the exact problem is, but after linking none of the functions from the 3rd or 4th fragment shader show up in the IR. As a result, the dead function pass removes a bunch of functions that aren't really dead. This leads to the function-inliner generating broken inlined functions. The problem seems to stem from some of the prototypes not being in the same compilation unit as the main function. Copying all of the prototypes to that compilation unit makes the problem go away. This should be handled by the existing code, but something is clearly going wrong. Fixed on master by the following commit. This is a pretty straightforward fix, so it should get cherry picked to the stable branches soon. commit 60f898a90ebd29d2593866faa1f2d6f65961a414 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Tue Mar 8 11:41:35 2011 -0800 linker: Add imported functions to the linked IR Fixes piglit test glsl-function-chain16 and bugzilla #34203. NOTE: This is a candidate for stable release branches. Fixed in 7.10 (55d86204f3f659fadc8e6dee694147afc35dfd97). verified on 7.10 branch |
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.