Bug 28967 - slang/slang_emit.c:350: storage_to_src_reg: Assertion `index >= 0' failed.
slang/slang_emit.c:350: storage_to_src_reg: Assertion `index >= 0' failed.
Status: CLOSED FIXED
Product: Mesa
Classification: Unclassified
Component: Other
git
x86 (IA32) Linux (All)
: medium critical
Assigned To: Brian Paul
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-08 15:33 UTC by Vinson Lee
Modified: 2010-07-08 19:08 UTC (History)
0 users

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 Vinson Lee 2010-07-08 15:33:06 UTC
mesa: 61a26cdfdc9c75a83c0d362c973d5436fe077be4 (master)

Run piglit glsl-vs-texturematrix-2 test.

$ ./bin/glsl-vs-texturematrix-2

(gdb) bt
#0  0x0012d422 in __kernel_vsyscall ()
#1  0x005e2651 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x005e5a82 in *__GI_abort () at abort.c:92
#3  0x005db718 in *__GI___assert_fail (assertion=0x42634b "index >= 0", file=0x4262e0 "slang/slang_emit.c", line=350, 
    function=0x426db4 "storage_to_src_reg") at assert.c:81
#4  0x003a6d28 in storage_to_src_reg (src=0x8393fb4, st=0xb6c4e348) at slang/slang_emit.c:350
#5  0x003a75a9 in emit_instruction (emitInfo=0xbfffce70, opcode=OPCODE_DP4, dst=0xb6c4e3b8, src0=0xb6c2b6e0, src1=0xb6c4e348, src2=0x0)
    at slang/slang_emit.c:593
#6  0x003a7aca in emit_arith (emitInfo=0xbfffce70, n=0xb6c4e378) at slang/slang_emit.c:861
#7  0x003aaf79 in emit (emitInfo=0xbfffce70, n=0xb6c4e378) at slang/slang_emit.c:2439
#8  0x003a8d2a in emit_copy (emitInfo=0xbfffce70, n=0xb6c4e3e8) at slang/slang_emit.c:1429
#9  0x003ab067 in emit (emitInfo=0xbfffce70, n=0xb6c4e3e8) at slang/slang_emit.c:2469
#10 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c4ee50) at slang/slang_emit.c:2357
#11 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c4f8b8) at slang/slang_emit.c:2357
#12 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c50320) at slang/slang_emit.c:2357
#13 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c503a0) at slang/slang_emit.c:2357
#14 0x003aaec6 in emit (emitInfo=0xbfffce70, n=0xb6c503e0) at slang/slang_emit.c:2373
#15 0x003aae6b in emit (emitInfo=0xbfffce70, n=0xb6c50420) at slang/slang_emit.c:2360
#16 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c504a0) at slang/slang_emit.c:2357
#17 0x003a79ef in emit_arith (emitInfo=0xbfffce70, n=0xb6c50550) at slang/slang_emit.c:849
#18 0x003aaf79 in emit (emitInfo=0xbfffce70, n=0xb6c50550) at slang/slang_emit.c:2439
#19 0x003a8d2a in emit_copy (emitInfo=0xbfffce70, n=0xb6c505c0) at slang/slang_emit.c:1429
#20 0x003ab067 in emit (emitInfo=0xbfffce70, n=0xb6c505c0) at slang/slang_emit.c:2469
#21 0x003aae6b in emit (emitInfo=0xbfffce70, n=0xb6c50600) at slang/slang_emit.c:2360
#22 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c506b0) at slang/slang_emit.c:2357
#23 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c507e0) at slang/slang_emit.c:2357
#24 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c50920) at slang/slang_emit.c:2357
#25 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c509a0) at slang/slang_emit.c:2357
#26 0x003aaec6 in emit (emitInfo=0xbfffce70, n=0xb6c509e0) at slang/slang_emit.c:2373
#27 0x003aae6b in emit (emitInfo=0xbfffce70, n=0xb6c50a20) at slang/slang_emit.c:2360
#28 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c50aa0) at slang/slang_emit.c:2357
#29 0x003a8d2a in emit_copy (emitInfo=0xbfffce70, n=0xb6c50ae0) at slang/slang_emit.c:1429
#30 0x003ab067 in emit (emitInfo=0xbfffce70, n=0xb6c50ae0) at slang/slang_emit.c:2469
#31 0x003aae6b in emit (emitInfo=0xbfffce70, n=0xb6c50b20) at slang/slang_emit.c:2360
#32 0x003aaec6 in emit (emitInfo=0xbfffce70, n=0xb6c50b60) at slang/slang_emit.c:2373
#33 0x003aae3f in emit (emitInfo=0xbfffce70, n=0xb6c50be0) at slang/slang_emit.c:2357
#34 0x003ab5ee in _slang_emit_code (n=0xb6c50be0, vt=0xb6c41b58, prog=0x838fba0, pragmas=0x808b5f8, withEnd=1 '\001', log=0xbfffe3ec)
    at slang/slang_emit.c:2655
#35 0x003a6464 in _slang_codegen_function (A=0xbfffcf0c, fun=0xb6c44f18) at slang/slang_codegen.c:5389
#36 0x002fef85 in parse_code_unit (C=0xbfffd114, unit=0xbfffd3c4, shader=0x808b5d8) at slang/slang_compile.c:2682
#37 0x002ff05f in compile_binary (prod=0x83a66f0 "\005\002\002", unit=0xbfffd3c4, version=110, type=SLANG_UNIT_VERTEX_SHADER, 
    infolog=0xbfffe3ec, builtin=0xbfffd314, downlink=0xbfffd398, shader=0x808b5d8) at slang/slang_compile.c:2725
#38 0x002ff3e6 in compile_with_grammar (
    source=0x838fb18 "uniform float i;\n\nvoid main()\n{\n\tgl_Position = gl_Vertex;\n\tgl_TexCoord[0] = (gl_Vertex * gl_TextureMatrix[int(i)] + 1.0) / 2.0;\n}\n", unit=0xbfffd3c4, type=SLANG_UNIT_VERTEX_SHADER, infolog=0xbfffe3ec, builtin=0xbfffd314, shader=0x808b5d8, 
    pragmas=0x808b5f8, shader_type=2, parsing_builtin=0) at slang/slang_compile.c:2837
#39 0x002ff759 in compile_object (
    source=0x838fb18 "uniform float i;\n\nvoid main()\n{\n\tgl_Position = gl_Vertex;\n\tgl_TexCoord[0] = (gl_Vertex * gl_TextureMatrix[int(i)] + 1.0) / 2.0;\n}\n", object=0xbfffd314, type=SLANG_UNIT_VERTEX_SHADER, infolog=0xbfffe3ec, shader=0x808b5d8, pragmas=0x808b5f8)
    at slang/slang_compile.c:2978
#40 0x002ff903 in _slang_compile (ctx=0x805d8c0, shader=0x808b5d8) at slang/slang_compile.c:3034
#41 0x0022a337 in compile_shader (ctx=0x805d8c0, shaderObj=1) at main/shaderapi.c:803
#42 0x0022aab1 in _mesa_CompileShaderARB (shaderObj=1) at main/shaderapi.c:1091
#43 0x0804b1ce in piglit_compile_shader_text ()
#44 0x0804b156 in piglit_compile_shader ()
#45 0x0804a4c2 in piglit_init ()
#46 0x0804bd05 in main ()
(gdb) frame 4
#4  0x003a6d28 in storage_to_src_reg (src=0x8393fb4, st=0xb6c4e348) at slang/slang_emit.c:350
350	   assert(index >= 0);
(gdb) print index
$1 = -1


The crash occurs with swrast and softpipe but not with llvmpipe.
Comment 1 Brian Paul 2010-07-08 17:43:25 UTC
Fixed with Mesa commit 41f66915ab3d052e0e2ef06000d6534eb7776ec6
Comment 2 Vinson Lee 2010-07-08 19:08:09 UTC
mesa: 75d0e95a3ad188ae1c4cc38a73241c6b227c0733 (master)

piglit glsl-vs-texturematrix-2 passes on swrast, softpipe, and llvmpipe.