[Bug 30415] New: segfault in r300compiler

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 28 02:28:32 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=30415

           Summary: segfault in r300compiler
           Product: Mesa
           Version: git
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/r300
        AssignedTo: dri-devel at lists.freedesktop.org
        ReportedBy: wixorpeek at gmail.com
                CC: maraeo at gmail.com


Compilation of this fragment shader segfaults:

uniform vec4 vecX, vecY;
uniform int iter;

void main() {
    bool b = (dot(gl_TexCoord[0], gl_TexCoord[0]) < 4.0);
    gl_FragColor.z = iter == 0 ? vecX.z - vecY.z : 15.0;
    if(b)
        gl_FragColor.x = 1.0;
}

Program terminated with signal 11, Segmentation fault.
#0  0x00007f202341cd8a in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x00007f202341cd8a in vfprintf () from /lib/libc.so.6
#1  0x00007f202343e3f2 in vsnprintf () from /lib/libc.so.6
#2  0x00007f2020251ce9 in rc_error (c=0x7fffcd99ca70, fmt=0x7f20209b75f0
"%s::%s(): %s: cannot write output and ALU result at the same time\n")
    at radeon_compiler.c:73
#3  0x00007f2020264fea in emit_paired (c=<value optimized out>, user=<value
optimized out>) at r500_fragprog_emit.c:253
#4  r500BuildFragmentProgramHwCode (c=<value optimized out>, user=<value
optimized out>) at r500_fragprog_emit.c:614
#5  0x00007f2020251988 in rc_run_compiler (c=0x7fffcd99ca70,
list=0x7fffcd99c900, shader_name=0x7f20209b69a2 "Fragment Program") at
radeon_compiler.c:365
#6  0x00007f2020261571 in r3xx_compile_fragment_program (c=0x7fffcd99ca70) at
r3xx_fragprog.c:155
#7  0x00007f2020258c53 in r300_translate_fragment_shader (r300=0x257d2a0,
shader=0x2ab84d0, tokens=0x269daf0) at r300_fs.c:429
#8  0x00007f2020259644 in r300_pick_fragment_shader (r300=0x257d2a0) at
r300_fs.c:507
#9  0x00007f202024b395 in r300_bind_fs_state (pipe=0x257d2a0,
shader=0x7f20209b75f6) at r300_state.c:885
#10 0x00007f20203a3f40 in cso_set_fragment_shader_handle (ctx=<value optimized
out>, handle=0x7f20209b75f6) at cso_cache/cso_context.c:743
#11 0x00007f202038aef7 in st_validate_state (st=0x25f67d0) at
state_tracker/st_atom.c:172
#12 0x00007f202035fd05 in st_draw_vbo (ctx=<value optimized out>,
arrays=0x25f9950, prims=<value optimized out>, nr_prims=<value optimized out>,
ib=0x4, 
    index_bounds_valid=16 '\020', min_index=0, max_index=3) at
state_tracker/st_draw.c:639
#13 0x00007f202038497f in vbo_exec_vtx_flush (exec=0x25f7e00, unmap=<value
optimized out>) at vbo/vbo_exec_draw.c:384
#14 0x00007f202038207c in vbo_exec_FlushVertices_internal (ctx=<value optimized
out>, unmap=246 '\366') at vbo/vbo_exec_api.c:876
#15 0x00007f20203820d2 in vbo_exec_FlushVertices (ctx=0x490010, flags=1) at
vbo/vbo_exec_api.c:910
#16 0x00007f202027ec1e in _mesa_Flush () at main/context.c:1673
#17 0x00007f20237506e6 in glutSwapBuffers () from /usr/lib/libglut.so.3

r300: Initial fragment program
FRAG
DCL IN[0], GENERIC[0], PERSPECTIVE
DCL OUT[0], COLOR
DCL CONST[0..2]
DCL TEMP[0..2]
IMM FLT32 {    4.0000,     0.0000,    15.0000,     1.0000}
  0: DP4 TEMP[0].x, IN[0], IN[0]
  1: SLT TEMP[1].x, TEMP[0].xxxx, IMM[0].xxxx
  2: MOV TEMP[0].x, TEMP[1].xxxx
  3: SEQ TEMP[1].x, CONST[0].xxxx, IMM[0].yyyy
  4: IF TEMP[1].xxxx :7
  5:   ADD TEMP[1].x, CONST[2].zzzz, -CONST[1].zzzz
  6:   MOV TEMP[2].x, TEMP[1].xxxx
  7: ELSE :9
  8:   MOV TEMP[2].x, IMM[0].zzzz
  9: ENDIF
 10: MOV OUT[0].z, TEMP[2].xxxx
 11: IF TEMP[0].xxxx :13
 12:   MOV OUT[0].x, IMM[0].wwww
 13: ENDIF
 14: END

The hardware is RV515, mesa is from git, commit 175261a1...

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the dri-devel mailing list