Summary: | [glsl] ir_constant_expression.cpp:72: virtual ir_constant* ir_expression::constant_expression_value(): Assertion `op[0]->type->base_type == op[1]->type->base_type' failed. | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | glsl-compiler | Assignee: | Kenneth Graunke <kenneth> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | medium | CC: | idr |
Version: | git | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Vinson Lee
2011-01-20 13:51:08 UTC
The assertion is correct; the bug is in ast_to_hir. While it correctly detects and emits the type error (int vs. bool), it still goes ahead and generates the ir_binop_all_equal expression node...with operands of bad types. This triggers assertions in later code such as ir_constant_expression or ir_validate. This looks like the same root cause as 33314 (just a different opcode). In fact, it looks like many opcodes suffer from this problem. commit 175829f1a8ab0df7594131cc569462e45c1974ec Author: Eric Anholt <eric@anholt.net> Date: Sat Apr 9 12:54:34 2011 -1000 glsl: When we've emitted a semantic error for ==, return a bool constant. This prevents later errors (including an assertion failure) from cascading the failure. Fixes invalid-equality-04.vert. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33303 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@intel.com> mesa: a9a02c8a39620515ec9fd0d774ce329cf67ecb4e (master) Verified fixed. |
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.