Bug 85691 - 'glsl: Drop constant 0.0 components from dot products.' broke piglit shaders/glsl-gnome-shell-dim-window and a few others with Gallium
Summary: 'glsl: Drop constant 0.0 components from dot products.' broke piglit shaders/...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Matt Turner
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-31 09:56 UTC by Michel Dänzer
Modified: 2014-11-03 19:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Dänzer 2014-10-31 09:56:25 UTC
Regression caused by commit d056863b3c535aeebfe5fcfc9468eb33a06ddb60:

shader_runner: ../../../src/glsl/ir_validate.cpp:486: virtual ir_visitor_status {anonymous}::ir_validate::visit_leave(ir_expression*): Assertion `ir->operands[0]->type->is_vector()' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff5b09107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff5b09107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff5b0a4e8 in __GI_abort () at abort.c:89
#2  0x00007ffff5b02226 in __assert_fail_base (fmt=0x7ffff5c38948 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff18d54e8 "ir->operands[0]->type->is_vector()", 
    file=file@entry=0x7ffff18ffd98 "../../../src/glsl/ir_validate.cpp", line=line@entry=486, 
    function=function@entry=0x7ffff1901240 <(anonymous namespace)::ir_validate::visit_leave(ir_expression*)::__PRETTY_FUNCTION__> "virtual ir_visitor_status {anonymous}::ir_validate::visit_leave(ir_expression*)") at assert.c:92
#3  0x00007ffff5b022d2 in __GI___assert_fail (assertion=0x7ffff18d54e8 "ir->operands[0]->type->is_vector()", file=0x7ffff18ffd98 "../../../src/glsl/ir_validate.cpp", line=486, 
    function=0x7ffff1901240 <(anonymous namespace)::ir_validate::visit_leave(ir_expression*)::__PRETTY_FUNCTION__> "virtual ir_visitor_status {anonymous}::ir_validate::visit_leave(ir_expression*)") at assert.c:101
#4  0x00007ffff14bbe70 in (anonymous namespace)::ir_validate::visit_leave (this=<optimized out>, ir=<optimized out>) at ../../../src/glsl/ir_validate.cpp:486
#5  0x00007ffff14b75d8 in ir_assignment::accept (this=0x6f3bf0, v=0x7fffffffe340) at ../../../src/glsl/ir_hv_accept.cpp:302
#6  0x00007ffff14b70e9 in visit_list_elements (statement_list=true, l=0x6cb3a8, v=0x7fffffffe340) at ../../../src/glsl/ir_hv_accept.cpp:55
#7  ir_function_signature::accept (this=0x6cb360, v=0x7fffffffe340) at ../../../src/glsl/ir_hv_accept.cpp:115
#8  0x00007ffff14b71cd in visit_list_elements (statement_list=false, l=0x6d4118, v=0x7fffffffe340) at ../../../src/glsl/ir_hv_accept.cpp:55
#9  ir_function::accept (this=0x6d40f0, v=0x7fffffffe340) at ../../../src/glsl/ir_hv_accept.cpp:127
#10 0x00007ffff14b6ec2 in visit_list_elements (v=v@entry=0x7fffffffe340, l=l@entry=0x6edac0, statement_list=statement_list@entry=true) at ../../../src/glsl/ir_hv_accept.cpp:55
#11 0x00007ffff14b6d17 in ir_hierarchical_visitor::run (this=this@entry=0x7fffffffe340, instructions=instructions@entry=0x6edac0) at ../../../src/glsl/ir_hierarchical_visitor.cpp:355
#12 0x00007ffff14be098 in validate_ir_tree (instructions=instructions@entry=0x6edac0) at ../../../src/glsl/ir_validate.cpp:850
#13 0x00007ffff140583e in st_link_shader (ctx=0x7ffff7f26010, prog=0x6ee2f0) at ../../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5422
#14 0x00007ffff142193f in _mesa_glsl_link_shader (ctx=0x7ffff7f26010, prog=0x6ee2f0) at ../../../src/mesa/program/ir_to_mesa.cpp:3038
#15 0x00007ffff1320458 in link_program (program=<optimized out>, ctx=0x7ffff7f26010) at ../../../src/mesa/main/shaderapi.c:917
#16 _mesa_LinkProgram (programObj=<optimized out>) at ../../../src/mesa/main/shaderapi.c:1385
#17 0x00007ffff7affcce in stub_glLinkProgram (program=3) at tests/util/piglit-dispatch-gen.c:29058
#18 0x0000000000406524 in link_and_use_shaders () at tests/shaders/shader_runner.c:829
#19 0x000000000040b27b in piglit_init (argc=2, argv=0x7fffffffe6e8) at tests/shaders/shader_runner.c:2686
#20 0x00007ffff7b68276 in run_test (gl_fw=0x611010, argc=2, argv=0x7fffffffe6e8) at tests/util/piglit-framework-gl/piglit_winsys_framework.c:72
#21 0x00007ffff7b4d8d5 in piglit_gl_test_run (argc=2, argv=0x7fffffffe6e8, config=0x7fffffffe5b0) at tests/util/piglit-framework-gl.c:151
#22 0x0000000000404ecc in main (argc=2, argv=0x7fffffffe6e8) at tests/shaders/shader_runner.c:60
Comment 1 Michel Dänzer 2014-10-31 09:57:02 UTC
Reproducible with llvmpipe.
Comment 2 Matt Turner 2014-10-31 17:33:55 UTC
patch on the list.
Comment 3 Ian Romanick 2014-10-31 19:10:08 UTC
We should also get a test case that reproduces the bug in piglit.
Comment 4 Matt Turner 2014-10-31 19:17:07 UTC
We've got one -- see bug 85683. I just didn't see it because I tested a release build of Mesa instead of debug with assertions.
Comment 5 Ian Romanick 2014-10-31 19:21:45 UTC
(In reply to Matt Turner from comment #4)
> We've got one -- see bug 85683. I just didn't see it because I tested a
> release build of Mesa instead of debug with assertions.

D'oh.  So... this bug could be closed as a dup of bug #85683?
Comment 6 Matt Turner 2014-11-03 19:44:45 UTC
commit 336e76c1439823185d425ebecb849ce38d55c4eb
Author: Matt Turner <mattst88@gmail.com>
Date:   Fri Oct 31 10:33:17 2014 -0700

    glsl: Emit mul instead of dot if only one component left.


bug/show.html.tmpl processed on Mar 25, 2017 at 07:44:11.
(provided by the Example extension).