Bug 85683 - [i965 Bisected]Piglit shaders_glsl-vs-raytrace-bug26691 segfault
Summary: [i965 Bisected]Piglit shaders_glsl-vs-raytrace-bug26691 segfault
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high normal
Assignee: Matt Turner
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-31 06:25 UTC by lu hua
Modified: 2014-11-05 01:21 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2014-10-31 06:25:47 UTC
System Environment:
--------------------------
Platform: BDW
Libdrm:		(master)libdrm-2.4.58-4-g00847fa48b83a85b0cb882594a12ed1511f780db
Mesa:		(master)600066af93fe60abbfff5be82527b529e1e44916
Xserver:	(master)xorg-server-1.16.99.901
Xf86_video_intel:(master)2.99.916-119-g61436c2fabe117b85404eecb06158ba0a63a7741
Libva:		(master)ccd93de5a707e92a629cccd595757c8d436fa3cc
Libva_intel_driver:(master)24cba20a119c96556ae4dc9a90043896ea70e567
Kernel:   (drm-intel-nightly)bd21cf795cf5dc278f1451d0f7a597cb1d13c2ba

Bug detailed description:
---------------------------
It segfault on i965 platforms with mesa master branch. It works well on 10.3 branch.

following ogles2conform cases fail on i965 platforms with same bisect commit.
ES2-CTS.gtf.GL2FixedTests.buffer_objects.buffer_objects
ES2-CTS.gtf.GL2FixedTests.user_clip_planes.user_clip_planes

Bisect shows: d056863b3c535aeebfe5fcfc9468eb33a06ddb60 is the first bad commit.
commit d056863b3c535aeebfe5fcfc9468eb33a06ddb60
Author:     Matt Turner <mattst88@gmail.com>
AuthorDate: Fri Oct 17 20:32:58 2014 -0700
Commit:     Matt Turner <mattst88@gmail.com>
CommitDate: Wed Oct 29 21:35:46 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%)

    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>


output:
Segmentation fault

(gdb) bt
#0  0x00007ffff297ed40 in emit_dp (elements=<optimized out>, src1=..., src0=..., dst=..., this=0x7fffffffd1e0) at brw_vec4_visitor.cpp:280
#1  brw::vec4_visitor::visit (this=0x7fffffffd1e0, ir=<optimized out>) at brw_vec4_visitor.cpp:1568
#2  0x00007ffff297e7fb in brw::vec4_visitor::visit (this=0x7fffffffd1e0, ir=0x127aa98) at brw_vec4_visitor.cpp:1296
#3  0x00007ffff29816a8 in brw::vec4_visitor::visit (this=0x7fffffffd1e0, ir=0x127ab18) at brw_vec4_visitor.cpp:2172
#4  0x00007ffff297ab83 in brw::vec4_visitor::visit_instructions (this=this@entry=0x7fffffffd1e0, list=<optimized out>) at brw_vec4_visitor.cpp:557
#5  0x00007ffff297ac31 in brw::vec4_visitor::visit (this=0x7fffffffd1e0, ir=<optimized out>) at brw_vec4_visitor.cpp:1122
#6  0x00007ffff297ab83 in brw::vec4_visitor::visit_instructions (this=this@entry=0x7fffffffd1e0, list=<optimized out>) at brw_vec4_visitor.cpp:557
#7  0x00007ffff297169e in brw::vec4_visitor::run (this=this@entry=0x7fffffffd1e0) at brw_vec4.cpp:1732
#8  0x00007ffff2971c54 in brw_vs_emit (brw=brw@entry=0x7ffff7fa8038, prog=prog@entry=0xf1d998, c=c@entry=0x7fffffffde30, prog_data=prog_data@entry=0x7fffffffdee0,
    mem_ctx=mem_ctx@entry=0xac3588, final_assembly_size=final_assembly_size@entry=0x7fffffffde2c) at brw_vec4.cpp:1881
#9  0x00007ffff298b039 in do_vs_prog (brw=brw@entry=0x7ffff7fa8038, prog=prog@entry=0xf1d998, vp=vp@entry=0x12c99d0, key=key@entry=0x7fffffffe010) at brw_vs.c:295
#10 0x00007ffff298b95e in brw_vs_precompile (ctx=0x7ffff7fa8038, prog=0xf1d998) at brw_vs.c:545
#11 0x00007ffff29696b5 in brw_shader_precompile (prog=0xf1d998, ctx=0x7ffff7fa8038) at brw_shader.cpp:68
#12 brw_link_shader (ctx=0x7ffff7fa8038, shProg=0xf1d998) at brw_shader.cpp:258
#13 0x00007ffff27fcdc6 in _mesa_glsl_link_shader (ctx=0x7ffff7fa8038, prog=0xf1d998) at ../../src/mesa/program/ir_to_mesa.cpp:3038
#14 0x00007ffff2709fca in link_program (ctx=0x7ffff7fa8038, program=<optimized out>) at ../../src/mesa/main/shaderapi.c:917
#15 0x00007ffff7afcbb8 in stub_glLinkProgram (program=2) at /GFX/Test/Piglit/piglit/tests/util/piglit-dispatch-gen.c:29058
#16 0x00007ffff7b4b19e in piglit_link_simple_program (vs=1, fs=0) at /GFX/Test/Piglit/piglit/tests/util/piglit-shader.c:243
#17 0x00000000004015bc in piglit_init (argc=1, argv=0x7fffffffe3d8) at /GFX/Test/Piglit/piglit/tests/shaders/glsl-vs-raytrace-bug26691.c:294
#18 0x00007ffff7b638be in run_test (gl_fw=0x636010, argc=1, argv=0x7fffffffe3d8) at /GFX/Test/Piglit/piglit/tests/util/piglit-framework-gl/piglit_fbo_framework.c:50
#19 0x00007ffff7b4a875 in piglit_gl_test_run (argc=1, argv=0x7fffffffe3d8, config=0x7fffffffe2a0) at /GFX/Test/Piglit/piglit/tests/util/piglit-framework-gl.c:151
#20 0x00000000004011f6 in main (argc=1, argv=0x7fffffffe3d8) at /GFX/Test/Piglit/piglit/tests/shaders/glsl-vs-raytrace-bug26691.c:36


Reproduce steps:
-------------------------
1. xinit
2. bin/glsl-vs-raytrace-bug26691 -auto -fbo
Comment 1 Matt Turner 2014-10-31 17:34:29 UTC
patch on the list
Comment 2 Matt Turner 2014-11-03 19:44:53 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.
Comment 3 lu hua 2014-11-05 01:21:47 UTC
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.