Bug 85799 - segfault since glsl: Drop constant 0.0 components from dot products
Summary: segfault since glsl: Drop constant 0.0 components from dot products
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Matt Turner
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-03 12:56 UTC by Andy Furniss
Modified: 2014-11-03 19:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Andy Furniss 2014-11-03 12:56:58 UTC
Running radeonsi with git llvm.

Unreal Elemental demo is segfaulting for me since 

d056863b3c535aeebfe5fcfc9468eb33a06ddb60 is the first bad commit
commit d056863b3c535aeebfe5fcfc9468eb33a06ddb60
Author: Matt Turner <mattst88@gmail.com>
Date:   Fri Oct 17 20:32:58 2014 -0700

    glsl: Drop constant 0.0 components from dot products.
    
    Helps a small number of vertex shaders in the games Dungeon Defenders
    and Shank, as well as an internal benchmark.
    
    instructions in affected programs:     2801 -> 2719 (-2.93%)



Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffed2d3700 (LWP 20246)]
0x00007ffff1687717 in emit_dp (elements=<optimized out>, src1=..., src0=..., dst=..., ir=0x7fffc874a238, this=0x7fffc86196c0) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:721
721        return emit(ir, dot_opcodes[elements - 2], dst, src0, src1);
(gdb) bt
#0  0x00007ffff1687717 in emit_dp (elements=<optimized out>, src1=..., src0=..., dst=..., ir=0x7fffc874a238, this=0x7fffc86196c0) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:721
#1  glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=0x7fffc874a238) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1755
#2  0x00007ffff16857e9 in glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=0x7fffc874a798) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1315
#3  0x00007ffff16857e9 in glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=0x7fffc86d4d38) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1315
#4  0x00007ffff16857e9 in glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=0x7fffc86d4db8) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1315
#5  0x00007ffff16857e9 in glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=0x7fffc8601da8) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1315
#6  0x00007ffff16857e9 in glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=0x7fffc86022f8) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1315
#7  0x00007ffff16857e9 in glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=0x7fffc8602848) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1315
#8  0x00007ffff168e1d3 in glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=0x7fffc8602988) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:2405
#9  0x00007ffff167d8bc in glsl_to_tgsi_visitor::visit (this=0x7fffc86196c0, ir=<optimized out>) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1193
#10 0x00007ffff171ae55 in visit_exec_list (list=<optimized out>, visitor=visitor@entry=0x7fffc86196c0) at ../../src/glsl/ir.cpp:1792
#11 0x00007ffff1698bf4 in get_mesa_program (shader=0x7fffc8653c98, shader_program=0x7fffc86dd5d8, ctx=0x4a8fc00) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5225
#12 st_link_shader (ctx=0x4a8fc00, prog=0x7fffc86dd5d8) at ../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5431
#13 0x00007ffff16ad686 in _mesa_glsl_link_shader (ctx=0x4a8fc00, prog=0x7fffc86dd5d8) at ../../src/mesa/program/ir_to_mesa.cpp:3038
#14 0x00007ffff15ff14a in link_program (ctx=0x4a8fc00, program=<optimized out>) at ../../src/mesa/main/shaderapi.c:917
Comment 1 Matt Turner 2014-11-03 19:45:21 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.


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.