Bug 78666

Summary: [r600g glsl-1.20] fs-const-array-of-struct-of-array broken on 6550D
Product: Mesa Reporter: David Heidelberg (okias) <david>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium CC: david
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description David Heidelberg (okias) 2014-05-13 16:14:35 UTC
$ gdb /home/okias/projects/piglit/bin/shader_runner
GNU gdb (Gentoo 7.7 p1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/okias/projects/piglit/bin/shader_runner...done.
(gdb) r /home/okias/projects/piglit/tests/spec/glsl-1.20/execution/fs-const-array-of-struct-of-array.shader_test -auto                                              
Starting program: /home/okias/projects/piglit/bin/shader_runner /home/okias/projects/piglit/tests/spec/glsl-1.20/execution/fs-const-array-of-struct-of-array.shader_test -auto
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff118c700 (LWP 26546)]
state_tracker/st_glsl_to_tgsi.cpp:4478:translate_src: Assertion `src_reg->file != PROGRAM_TEMPORARY' failed.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff3600f88 in _debug_assert_fail (expr=0x7ffff3762530 "src_reg->file != PROGRAM_TEMPORARY", file=0x7ffff3761788 "state_tracker/st_glsl_to_tgsi.cpp", line=4478, 
    function=0x7ffff3762ce2 <translate_src(st_translate*, st_src_reg const*)::__FUNCTION__> "translate_src") at util/u_debug.c:277
277     util/u_debug.c: No such file or directory.
(gdb) bt
#0  0x00007ffff3600f88 in _debug_assert_fail (expr=0x7ffff3762530 "src_reg->file != PROGRAM_TEMPORARY", file=0x7ffff3761788 "state_tracker/st_glsl_to_tgsi.cpp", line=4478, 
    function=0x7ffff3762ce2 <translate_src(st_translate*, st_src_reg const*)::__FUNCTION__> "translate_src") at util/u_debug.c:277
#1  0x00007ffff3488f8e in translate_src (t=<error reading variable: Could not find the frame base for "translate_src(st_translate*, st_src_reg const*)".>, 
    src_reg=<error reading variable: Could not find the frame base for "translate_src(st_translate*, st_src_reg const*)".>) at state_tracker/st_glsl_to_tgsi.cpp:4478
#2  0x00007ffff34893a0 in compile_tgsi_instruction (t=<error reading variable: Could not find the frame base for "compile_tgsi_instruction(st_translate*, glsl_to_tgsi_instruction const*, bool)".>, 
    inst=<error reading variable: Could not find the frame base for "compile_tgsi_instruction(st_translate*, glsl_to_tgsi_instruction const*, bool)".>, 
    clamp_dst_color_output=<error reading variable: Could not find the frame base for "compile_tgsi_instruction(st_translate*, glsl_to_tgsi_instruction const*, bool)".>)
    at state_tracker/st_glsl_to_tgsi.cpp:4559
#3  0x00007ffff348af54 in st_translate_program (
    ctx=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                         
    procType=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                    
    ureg=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                        
    program=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                     
    proginfo=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                    
    numInputs=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                   
    inputMapping=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                
    inputSemanticName=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                           
    inputSemanticIndex=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                          
    interpMode=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                  
    is_centroid=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                 
    numOutputs=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>,                                                                                  
    outputMapping=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>, 
    outputSemanticName=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>, 
    outputSemanticIndex=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>, 
    passthrough_edgeflags=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>, 
    clamp_color=<error reading variable: Could not find the frame base for "st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, gl_program const*, GLuint, GLuint const*, ubyte const*, ubyte const*, GLuint const*, GLboolean const*, GLuint, GLuint const*, ubyte const*, ubyte const*, boolean, boolean)".>) at state_tracker/st_glsl_to_tgsi.cpp:5121
#4  0x00007ffff34944bc in st_translate_fragment_program (st=0x6ac6d0, stfp=0x70a8d0, key=0x7fffffffd3d0) at state_tracker/st_program.c:747
#5  0x00007ffff34946b6 in st_get_fp_variant (st=0x6ac6d0, stfp=0x70a8d0, key=0x7fffffffd3d0) at state_tracker/st_program.c:824
#6  0x00007ffff3452fba in update_fp (st=0x6ac6d0) at state_tracker/st_atom_shader.c:92
#7  0x00007ffff344d64e in st_validate_state (st=0x6ac6d0) at state_tracker/st_atom.c:213
#8  0x00007ffff346e29c in st_draw_vbo (ctx=0x7ffff7ef8010, prims=0x7fffffffd570, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3, tfb_vertcount=0x0, indirect=0x0)
    at state_tracker/st_draw.c:198
#9  0x00007ffff3427333 in vbo_draw_arrays (ctx=0x7ffff7ef8010, mode=5, start=0, count=4, numInstances=1, baseInstance=0) at vbo/vbo_exec_array.c:667
#10 0x00007ffff3427a7c in vbo_exec_DrawArrays (mode=5, start=0, count=4) at vbo/vbo_exec_array.c:819
#11 0x00007ffff7af9efd in stub_glDrawArrays (mode=5, first=0, count=4) at /home/okias/projects/piglit/tests/util/generated_dispatch.c:6274
#12 0x00007ffff7ae6f27 in piglit_draw_rect_from_arrays (verts=0x7fffffffd680, tex=0x0) at /home/okias/projects/piglit/tests/util/piglit-util-gl-common.c:632
#13 0x00007ffff7ae729f in piglit_draw_rect (x=-1, y=-1, w=2, h=2) at /home/okias/projects/piglit/tests/util/piglit-util-gl-common.c:741
#14 0x0000000000408bc2 in piglit_display () at /home/okias/projects/piglit/tests/shaders/shader_runner.c:1895
#15 0x00007ffff7aeb2f0 in run_test (gl_fw=0x60e010, argc=2, argv=0x7fffffffda08) at /home/okias/projects/piglit/tests/util/piglit-framework-gl/piglit_winsys_framework.c:76
#16 0x00007ffff7ae7a4a in piglit_gl_test_run (argc=2, argv=0x7fffffffda08, config=0x7fffffffd8d0) at /home/okias/projects/piglit/tests/util/piglit-framework-gl.c:151
#17 0x000000000040466e in main (argc=2, argv=0x7fffffffda08) at /home/okias/projects/piglit/tests/shaders/shader_runner.c:60
Comment 1 David Heidelberg (okias) 2014-05-13 16:16:01 UTC
Kernel: 3.12.18
Mesa: git today (1646f4d0fb0efec04dce62b6dd4d974206acc8ac)
Card: Radeon HD 6550D (on 3870K cpu)
Comment 2 Michel Dänzer 2014-05-14 04:28:37 UTC
The assertion fails while translating from GLSL IR to TGSI.
Comment 3 David Heidelberg (okias) 2014-05-14 12:26:37 UTC
(In reply to comment #2)
> The assertion fails while translating from GLSL IR to TGSI.

and when it's compiled without debug information, it just segfault elsewhere
Comment 4 Timothy Arceri 2016-02-12 12:16:04 UTC
This was likely fixed a while ago. Tested and working fine on:

OpenGL renderer string: Gallium 0.4 on AMD TURKS (DRM 2.41.0, LLVM 3.7.0)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.1.0 (git-525f3c2)

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.