Summary: | loop_analysis.h:193: bool loop_variable::is_loop_constant() const: Assertion `!this->var->read_only || (this->var->read_only && is_const)' failed. | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Mesa core | Assignee: | Ian Romanick <idr> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | medium | CC: | brianp |
Version: | git | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 30124 |
Description
Vinson Lee
2010-10-01 18:31:30 UTC
I've created a new piglit test, glsl-link-bug30552, which reproduces the crash. mesa: 2cdfda8851e919f26d0a4c77f6141895e4b86e38 (7.9) - same assert mesa: 3af43c0b4c29f7cb82df72d0b65bcd190053f57c (7.8) - pass 8df2dbf91ddfd0c1590e33015e85470b67e69319 is the first bad commit commit 8df2dbf91ddfd0c1590e33015e85470b67e69319 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Thu Aug 26 16:45:22 2010 -0700 glsl2: Perform initial bits of loop analysis during compilation :040000 040000 3f88d7f238957cb115d99b03cf45f952c44a1f6e 3f7875e7e46b568dda8ce43a28314d40cfaedb36 M src bisect run success It seems to break because the function parameter is marked 'const'. Removing 'const' from the function prototype makes the test pass. The constness of the variable gets inlined with the rest of the function, but there's also an assignment to the variable (inside the loop). LOLs ensue. My guess is that removing the const decoration from inlined function parameters will fix this issue. Ian, can this be fixed in the glsl compiler? The shader is legal as-is. (In reply to comment #5) > Ian, can this be fixed in the glsl compiler? The shader is legal as-is. Yes. I just haven't gotten to it yet. What I meant by > My guess is that removing the const decoration from inlined function parameters > will fix this issue. is that the function inliner in the compiler should remove the const decoration when it inlines the function. I didn't mean that the shader itself should be changed. commit 0ea8b993324365769ed0aa2f7bab2dd9281b4924 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Fri Oct 8 14:29:11 2010 -0700 glsl: Remove const decoration from inlined function parameters The constness of the function parameter gets inlined with the rest of the function. However, there is also an assignment to the parameter. If this occurs inside a loop the loop analysis code will get confused by the assignment to a read-only variable. Fixes bugzilla #30552. NOTE: this is a candidate for the 7.9 branch. mesa: 31b10516636043b8d92ce518acf6afb27d82a2d1 (master) Verified fixed. This crash no longer appears with VMware Workstation. |
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.