Bug 31101 - [glsl2] abort() in ir_validate::visit_enter(ir_assignment *ir)
Summary: [glsl2] abort() in ir_validate::visit_enter(ir_assignment *ir)
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) All
: medium normal
Assignee: Kenneth Graunke
QA Contact:
Depends on:
Reported: 2010-10-25 12:01 UTC by Fredrik Höglund
Modified: 2010-10-25 12:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Fredrik Höglund 2010-10-25 12:01:05 UTC
The GLSL compiler aborts when validating the IR for this shader:

void main()
    vec2 var;
    gl_FragColor = vec4(var, vec2(1.0));

Debug output:

Assignment count of LHS write mask channels enabled not
matching RHS vector size (2 LHS, 1 RHS).
(assign (constant bool (1)) (zw) (var_ref vec_ctor@0x9ed8ad0)  (constant float (1.000000)) )
Comment 1 Kenneth Graunke 2010-10-25 12:58:02 UTC
Thanks for the report!  This should be fixed in master by the following commit:

commit ba2382f50d7815947e17fe993b39feb573638d12
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Mon Oct 25 12:44:55 2010 -0700

    glsl: Fix constant component count in vector constructor emitting.
    Fixes freedesktop.org bug #31101 as well as piglit test cases
    assignment-type-mismatch.vert and constructor-28.vert.

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.