Summary: | Wrong shader compilation error message | ||
---|---|---|---|
Product: | Mesa | Reporter: | Ruslan Kabatsayev <b7.10110111> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | imirkin |
Version: | 10.3 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Ruslan Kabatsayev
2016-06-29 16:07:57 UTC
This is happening because there's a ast_add_assign node, which first figures out the compatible type based on the add operation, and implicitly converts the "other" side. So we end up with (i2f v.y) += (128 * x) And of course the i2f isn't an lvalue, hence the error. The issue is that ast_to_hir.cpp::arithmetic_result_type has no concept that an assignment is taking place, and happily applies the conversion. My initial thought was that we should pass the fact that it's an assignment through, but that gets a little nasty. My second thought is that in an assign situation, the arithmetic_result_type has to return the (original) op[0]'s type. If not, then we should throw an error. And this applies to all the other instances of this. This patch changes the error on the supplied shader. https://patchwork.freedesktop.org/patch/97904/ Fix pushed: commit a32c87f74be1beed546d6d8853933d1b48f42f18 Author: Ilia Mirkin <imirkin@alum.mit.edu> Date: Fri Jul 8 23:28:22 2016 -0400 glsl: emit a specific error when ast_*_assign changes type |
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.