Hi Brian,

I am facing a strange segfault with r600g on top of lastest git,
git bisect pointed to gallium: implement bounds checking for constant buffers
My feeling is that it should only affect software pipeline but
somehow r600g seem to take different path now, attached if full
but i can't make much sense out of it, do you have a clue on what
might went wrong ?

Cheers,
Jerome
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/glisse/code/demos/src/demos/tunnel 
[Thread debugging using libthread_db enabled]
Tunnel V1.5
Written by David Bucciarelli (tech....@plus.it)
libGL: OpenDriver: trying /home/glisse/code/gr600/lib/gallium//r600_dri.so
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/glisse/.drirc: No such file or 
directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/glisse/.drirc: No such file or 
directory.
--------------------------------------------------------------
VERT
DCL IN[0]
DCL IN[1]
DCL OUT[0], POSITION
DCL OUT[1], COLOR
  0: MOV OUT[0], IN[0]
  1: MOV OUT[1], IN[1]
  2: END
______________________________________________________________
--------------------------------------------------------------
VERT
DCL IN[0]
DCL IN[1]
DCL OUT[0], POSITION
DCL OUT[1], GENERIC[0]
  0: MOV OUT[0], IN[0]
  1: MOV OUT[1], IN[1]
  2: END
______________________________________________________________
ps_prio : 0
vs_prio : 1
gs_prio : 2
es_prio : 3
num_ps_gprs : 84
num_vs_gprs : 36
num_gs_gprs : 0
num_es_gprs : 0
num_temp_gprs : 4
num_ps_threads : 136
num_vs_threads : 48
num_gs_threads : 4
num_es_threads : 4
num_ps_stack_entries : 40
num_vs_stack_entries : 40
num_gs_stack_entries : 32
num_es_stack_entries : 16
--------------------------------------------------------------
FRAG
DCL IN[0], COLOR, PERSPECTIVE
DCL OUT[0], COLOR
  0: MOV OUT[0], IN[0]
  1: END
______________________________________________________________
--------------------------------------------------------------
VERT
DCL IN[0]
DCL IN[1]
DCL OUT[0], POSITION
DCL OUT[1], COLOR
  0: MOV OUT[0], IN[0]
  1: MOV OUT[1], IN[1]
  2: END
______________________________________________________________
--------------------------------------------------------------
VERT
DCL IN[0]
DCL IN[1]
DCL OUT[0], POSITION
DCL OUT[1], GENERIC[0]
  0: MOV OUT[0], IN[0]
  1: MOV OUT[1], IN[1]
  2: END
______________________________________________________________
--------------------------------------------------------------
FRAG
DCL IN[0], GENERIC[0], LINEAR
DCL OUT[0], COLOR
DCL SAMP[0]
  0: TEX OUT[0], IN[0], SAMP[0], 2D
  1: END
______________________________________________________________
--------------------------------------------------------------
FRAG
DCL IN[0], GENERIC[0], LINEAR
DCL OUT[0], COLOR
DCL SAMP[0]
  0: TEX OUT[0], IN[0], SAMP[0], CUBE
  1: END
______________________________________________________________
--------------------------------------------------------------
VERT
DCL IN[0]
DCL IN[1]
DCL OUT[0], POSITION
DCL OUT[1], GENERIC[0]
  0: MOV OUT[0], IN[0]
  1: MOV OUT[1], IN[1]
  2: END
______________________________________________________________
--------------------------------------------------------------
FRAG
DCL IN[0], GENERIC[0], LINEAR
DCL OUT[0], COLOR
DCL SAMP[0]
  0: TEX OUT[0], IN[0], SAMP[0], 2D
  1: END
______________________________________________________________
--------------------------------------------------------------
FRAG
DCL IN[0], COLOR, LINEAR
DCL IN[1], FOG, PERSPECTIVE
DCL IN[2], GENERIC[0], PERSPECTIVE
DCL OUT[0], COLOR
DCL SAMP[0]
DCL CONST[0..1]
DCL TEMP[0..2]
  0: TXP TEMP[0], IN[2], SAMP[0], 2D
  1: MUL_SAT TEMP[1].xyz, TEMP[0], IN[0]
  2: MOV_SAT TEMP[1].w, IN[0]
  3: MUL TEMP[2].x, CONST[0].wwww, IN[1].xxxx
  4: MUL TEMP[2].x, TEMP[2].xxxx, TEMP[2].xxxx
  5: EX2_SAT TEMP[2].x, -TEMP[2].xxxx
  6: LRP OUT[0].xyz, TEMP[2].xxxx, TEMP[1], CONST[1]
  7: MOV OUT[0].w, TEMP[1]
  8: END
______________________________________________________________
--------------------------------------------------------------
VERT
DCL IN[0]
DCL IN[1]
DCL IN[2]
DCL OUT[0], POSITION
DCL OUT[1], COLOR
DCL OUT[2], FOG
DCL OUT[3], GENERIC[0]
DCL CONST[0..7]
DCL TEMP[0]
IMM FLT32 {    0.0000,     1.0000,     0.0000,     0.0000}
  0: MUL TEMP[0], IN[0].xxxx, CONST[0]
  1: MAD TEMP[0], IN[0].yyyy, CONST[1], TEMP[0]
  2: MAD TEMP[0], IN[0].zzzz, CONST[2], TEMP[0]
  3: MAD OUT[0], IN[0].wwww, CONST[3], TEMP[0]
  4: MOV OUT[1], IN[1]
  5: DP4 TEMP[0], IN[0], CONST[6]
  6: ABS OUT[2].x, TEMP[0]
  7: MOV OUT[2].yzw, IMM[0].xxxy
  8: MOV OUT[3], IN[2]
  9: END
______________________________________________________________
--------------------------------------------------------------
FRAG
DCL IN[0], COLOR, PERSPECTIVE
DCL OUT[0], COLOR
  0: MOV OUT[0], IN[0]
  1: END
______________________________________________________________
--------------------------------------------------------------
VERT
DCL IN[0]
DCL IN[1]
DCL IN[2]
DCL OUT[0], POSITION
DCL OUT[1], COLOR
DCL OUT[2], FOG
DCL OUT[3], GENERIC[0]
DCL CONST[0..7]
DCL TEMP[0]
IMM FLT32 {    0.0000,     1.0000,     0.0000,     0.0000}
  0: MUL TEMP[0], IN[0].xxxx, CONST[0]
  1: MAD TEMP[0], IN[0].yyyy, CONST[1], TEMP[0]
  2: MAD TEMP[0], IN[0].zzzz, CONST[2], TEMP[0]
  3: MAD OUT[0], IN[0].wwww, CONST[3], TEMP[0]
  4: MOV OUT[1], IN[1]
  5: DP4 TEMP[0], IN[0], CONST[6]
  6: ABS OUT[2].x, TEMP[0]
  7: MOV OUT[2].yzw, IMM[0].xxxy
  8: MOV OUT[3], IN[2]
  9: END
______________________________________________________________
--------------------------------------------------------------
FRAG
DCL IN[0], COLOR, LINEAR
DCL OUT[0], COLOR
  0: MOV OUT[0], IN[0]
  1: END
______________________________________________________________
--------------------------------------------------------------
VERT
DCL IN[0]
DCL IN[1]
DCL OUT[0], POSITION
DCL OUT[1], COLOR
DCL CONST[0..3]
DCL TEMP[0]
  0: MUL TEMP[0], IN[0].xxxx, CONST[0]
  1: MAD TEMP[0], IN[0].yyyy, CONST[1], TEMP[0]
  2: MAD TEMP[0], IN[0].zzzz, CONST[2], TEMP[0]
  3: MAD OUT[0], IN[0].wwww, CONST[3], TEMP[0]
  4: MOV OUT[1], IN[1]
  5: END
______________________________________________________________

Program received signal SIGSEGV, Segmentation fault.
0xb709b2c1 in ?? ()
(gdb) bt
#0  0xb709b2c1 in ?? ()
#1  0xb7e10986 in draw_vertex_shader_run (vshader=0x829f048, 
constants=0x80daf90, const_size=0x80db010, 
    input_verts=0xbfffe75c, output_verts=0xbfffe74c) at 
draw/draw_pt_fetch_shade_pipeline.c:190
#2  0xb7e10a8f in fetch_pipeline_generic (middle=0x80dd600, fetch_info=0x0, 
prim_info=0xbfffe7c0)
    at draw/draw_pt_fetch_shade_pipeline.c:239
#3  0xb7e10c0c in fetch_pipeline_run (middle=0x80dd600, fetch_elts=0x80eb1c4, 
fetch_count=1, draw_elts=0x80e31c4, 
    draw_count=1) at draw/draw_pt_fetch_shade_pipeline.c:317
#4  0xb7e12e13 in vcache_flush (vcache=0x80e2bb0) at draw/draw_pt_vcache.c:81
#5  0xb7e13a33 in vcache_run_extras (frontend=0x80e2bb0, get_elt=0xb7e0f080 
<elt_vert>, elts=0x0, elt_bias=0, count=1)
    at draw/draw_pt_vcache_tmp.h:190
#6  0xb7e0e9a1 in draw_pt_arrays (draw=0x80daa80, prim=0, start=0, count=1) at 
draw/draw_pt.c:129
#7  0xb7e0f036 in draw_arrays_instanced (draw=0x80daa80, mode=0, start=0, 
count=1, startInstance=0, instanceCount=1)
    at draw/draw_pt.c:380
#8  0xb7e0efad in draw_arrays (draw=0x80daa80, prim=0, start=0, count=1) at 
draw/draw_pt.c:317
#9  0xb7df6446 in st_feedback_draw_vbo (ctx=0x80835a0, arrays=0x829d9d8, 
prims=0x829da58, nr_prims=1, ib=0x0, 
    index_bounds_valid=1 '\001', min_index=0, max_index=1) at 
state_tracker/st_draw_feedback.c:257
#10 0xb7defa12 in st_RasterPos (ctx=0x80835a0, v=0xbfffef0c) at 
state_tracker/st_cb_rasterpos.c:254
#11 0xb7d0543f in rasterpos (x=10, y=10, z=0, w=1) at main/rastpos.c:63
#12 0xb7d0550f in _mesa_RasterPos2i (x=10, y=10) at main/rastpos.c:82
#13 0x0804a11b in draw () at tunnel.c:450
#14 0xb7f52681 in processWindowWorkList (window=0x8059fe8) at glut_event.c:1307
#15 0xb7f5278c in __glutProcessWindowWorkLists () at glut_event.c:1358
#16 0xb7f527fd in glutMainLoop () at glut_event.c:1379
#17 0x080499bb in main (ac=1, av=0xbffff1d4) at tunnel.c:539
(gdb) frame 1
#1  0xb7e10986 in draw_vertex_shader_run (vshader=0x829f048, 
constants=0x80daf90, const_size=0x80db010, 
    input_verts=0xbfffe75c, output_verts=0xbfffe74c) at 
draw/draw_pt_fetch_shade_pipeline.c:190
190        vshader->run_linear(vshader,
(gdb) p *vshader
$3 = {draw = 0x80daa80, state = {tokens = 0x8299a78}, info = {num_tokens = 12, 
num_inputs = 2 '\002', 
    num_outputs = 2 '\002', input_semantic_name = '\000' <repeats 31 times>, 
    input_semantic_index = '\000' <repeats 31 times>, input_interpolate = 
'\000' <repeats 31 times>, 
    input_usage_mask = "\017\017", '\000' <repeats 29 times>, 
input_cylindrical_wrap = '\000' <repeats 31 times>, 
    output_semantic_name = "\000\001", '\000' <repeats 29 times>, 
output_semantic_index = '\000' <repeats 31 times>, 
    file_mask = {0, 15, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0}, file_count = {0, 4, 2, 
2, 1, 0, 0, 0, 0, 0, 0, 0}, file_max = {
      -1, 3, 1, 1, 0, -1, -1, -1, -1, -1, -1, -1}, immediate_count = 0, 
num_instructions = 6, opcode_count = {0, 1, 
      0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0 <repeats 100 times>, 1, 0 
<repeats 27 times>}, 
    writes_z = 0 '\000', writes_edgeflag = 0 '\000', uses_kill = 0 '\000', 
indirect_files = 0, properties = {{
        name = 0, data = {0, 0, 0, 0, 0, 0, 0, 0}}, {name = 0, data = {0, 0, 0, 
0, 0, 0, 0, 0}}, {name = 0, data = {
          0, 0, 0, 0, 0, 0, 0, 0}}, {name = 0, data = {0, 0, 0, 0, 0, 0, 0, 
0}}, {name = 0, data = {0, 0, 0, 0, 0, 0, 
          0, 0}}}, num_properties = 0}, position_output = 0, edgeflag_output = 
0, immediates = 0x82abbc0, varient = {
    0x0 <repeats 16 times>}, nr_varients = 0, last_varient = 0, 
  create_varient = 0xb7e6cf8b <draw_vs_create_varient_aos_sse>, prepare = 
0xb7e16019 <vs_sse_prepare>, 
  run_linear = 0xb7e16045 <vs_sse_run_linear>, delete = 0xb7e1617d 
<vs_sse_delete>}
(gdb) bt full
#0  0xb709b2c1 in ?? ()
No symbol table info available.
#1  0xb7e10986 in draw_vertex_shader_run (vshader=0x829f048, 
constants=0x80daf90, const_size=0x80db010, 
    input_verts=0xbfffe75c, output_verts=0xbfffe74c) at 
draw/draw_pt_fetch_shade_pipeline.c:190
No locals.
#2  0xb7e10a8f in fetch_pipeline_generic (middle=0x80dd600, fetch_info=0x0, 
prim_info=0xbfffe7c0)
    at draw/draw_pt_fetch_shade_pipeline.c:239
        fpme = 0x80dd600
        draw = 0x80daa80
        vshader = 0x829f048
        gshader = 0x0
        gs_prim_info = {linear = 0 '\000', start = 0, elts = 0x0, count = 0, 
prim = 0, primitive_lengths = 0x0, 
          primitive_count = 0}
        fetched_vert_info = {verts = 0x8296208, vertex_size = 68, stride = 68, 
count = 1}
        vs_vert_info = {verts = 0x829fc98, vertex_size = 68, stride = 68, count 
= 1}
        gs_vert_info = {verts = 0x0, vertex_size = 0, stride = 0, count = 0}
        vert_info = 0xbfffe75c
        opt = 7
#3  0xb7e10c0c in fetch_pipeline_run (middle=0x80dd600, fetch_elts=0x80eb1c4, 
fetch_count=1, draw_elts=0x80e31c4, 
    draw_count=1) at draw/draw_pt_fetch_shade_pipeline.c:317
        fpme = 0x80dd600
        fetch_info = {linear = 0 '\000', start = 0, elts = 0x80eb1c4, count = 1}
        prim_info = {linear = 0 '\000', start = 0, elts = 0x80e31c4, count = 1, 
prim = 0, 
          primitive_lengths = 0xbfffe810, primitive_count = 1}
#4  0xb7e12e13 in vcache_flush (vcache=0x80e2bb0) at draw/draw_pt_vcache.c:81
No locals.
#5  0xb7e13a33 in vcache_run_extras (frontend=0x80e2bb0, get_elt=0xb7e0f080 
<elt_vert>, elts=0x0, elt_bias=0, count=1)
    at draw/draw_pt_vcache_tmp.h:190
        vcache = 0x80e2bb0
        draw = 0x80daa80
---Type <return> to continue, or q <return> to quit---
        flatfirst = 0 '\000'
        i = 1
        flags = 0
        __FUNCTION__ = "vcache_run_extras"
#6  0xb7e0e9a1 in draw_pt_arrays (draw=0x80daa80, prim=0, start=0, count=1) at 
draw/draw_pt.c:129
        frontend = 0x80e2bb0
        middle = 0x80dd600
        opt = 7
#7  0xb7e0f036 in draw_arrays_instanced (draw=0x80daa80, mode=0, start=0, 
count=1, startInstance=0, instanceCount=1)
    at draw/draw_pt.c:380
        reduced_prim = 0
        instance = 0
#8  0xb7e0efad in draw_arrays (draw=0x80daa80, prim=0, start=0, count=1) at 
draw/draw_pt.c:317
No locals.
#9  0xb7df6446 in st_feedback_draw_vbo (ctx=0x80835a0, arrays=0x829d9d8, 
prims=0x829da58, nr_prims=1, ib=0x0, 
    index_bounds_valid=1 '\001', min_index=0, max_index=1) at 
state_tracker/st_draw_feedback.c:257
        st = 0x80c5f00
        pipe = 0x80691d0
        draw = 0x80daa80
        vp = 0x82a7758
        vs = 0x8299d54
        index_buffer_handle = 0x0
        vbuffers = {{stride = 0, max_index = 1, buffer_offset = 0, buffer = 
0x8299b18}, {stride = 0, max_index = 1, 
            buffer_offset = 0, buffer = 0x82a0ab8}, {stride = 136972984, 
max_index = 12732516, 
            buffer_offset = 12981196, buffer = 0x0}, {stride = 12981196, 
max_index = 12981152, 
            buffer_offset = 3085002143, buffer = 0xc613d0}, {stride = 11825707, 
max_index = 12976116, 
            buffer_offset = 12981152, buffer = 0x0}, {stride = 3221220648, 
max_index = 3083215214, buffer_offset = 1, 
            buffer = 0x30}, {stride = 3221220568, max_index = 3083290072, 
buffer_offset = 135290632, buffer = 0x1}, {
            stride = 12981208, max_index = 136972984, buffer_offset = 11833814, 
buffer = 0xb7e7fa00}, {stride = 4, 
            max_index = 119, buffer_offset = 124, buffer = 0x5c}, {stride = 64, 
max_index = 3085865104, 
---Type <return> to continue, or q <return> to quit---
            buffer_offset = 11833814, buffer = 0x0}, {stride = 3221220616, 
max_index = 3083289075, 
            buffer_offset = 135290632, buffer = 0x0}, {stride = 0, max_index = 
4, buffer_offset = 136973032, 
            buffer = 0xc613a0}, {stride = 3221220664, max_index = 3085865104, 
buffer_offset = 1090519040, 
            buffer = 0x0}, {stride = 3221220664, max_index = 3085329891, 
buffer_offset = 0, buffer = 0xc613a0}, {
            stride = 135253872, max_index = 134618024, buffer_offset = 
136911920, buffer = 0xb7ee9090}, {
            stride = 3221220712, max_index = 3085330179, buffer_offset = 
134648272, buffer = 0x82a0ab8}, {
            stride = 184, max_index = 3083227734, buffer_offset = 136943728, 
buffer = 0x0}, {stride = 3221220744, 
            max_index = 135253872, buffer_offset = 3085865104, buffer = 
0x8291c30}, {stride = 3221220744, 
            max_index = 3083300057, buffer_offset = 134648272, buffer = 
0x82a0ab8}, {stride = 64, max_index = 0, 
            buffer_offset = 3085865104, buffer = 0x41000000}, {stride = 
3221220840, max_index = 3083302491, 
            buffer_offset = 134648272, buffer = 0x80fcf70}, {stride = 
136972984, max_index = 3221220796, 
            buffer_offset = 134648272, buffer = 0x80fcf70}, {stride = 0, 
max_index = 2, buffer_offset = 3221220804, 
            buffer = 0x8293bf0}, {stride = 64, max_index = 136972984, 
buffer_offset = 134618024, buffer = 0x80691d0}, 
          {stride = 4, max_index = 4, buffer_offset = 10, buffer = 0x109}, 
{stride = 136920744, 
            max_index = 136966144, buffer_offset = 32, buffer = 0xb7ee9090}, 
{stride = 3221220904, 
            max_index = 3084778299, buffer_offset = 134648272, buffer = 0x0}, 
{stride = 0, max_index = 135253872, 
            buffer_offset = 136920048, buffer = 0x80c5f74}, {stride = 32, 
max_index = 134648272, 
            buffer_offset = 137000792, buffer = 0x80691d0}, {stride = 
135029312, max_index = 64, buffer_offset = 0, 
            buffer = 0xb7ee9090}, {stride = 3221220952, max_index = 3084778685, 
buffer_offset = 135028480, 
            buffer = 0x82a0fa8}, {stride = 1, max_index = 6, buffer_offset = 
12981152, buffer = 0x0}}
        velements = {{src_offset = 0, instance_divisor = 0, vertex_buffer_index 
= 0, 
            src_format = PIPE_FORMAT_R32G32B32A32_FLOAT}, {src_offset = 0, 
instance_divisor = 0, 
            vertex_buffer_index = 1, src_format = 
PIPE_FORMAT_R32G32B32A32_FLOAT}, {src_offset = 0, 
            instance_divisor = 0, vertex_buffer_index = 0, src_format = 
PIPE_FORMAT_NONE}, {src_offset = 0, 
            instance_divisor = 0, vertex_buffer_index = 0, src_format = 
PIPE_FORMAT_B8G8R8A8_UNORM}, {src_offset = 0, 
            instance_divisor = 0, vertex_buffer_index = 0, src_format = 
PIPE_FORMAT_NONE} <repeats 17 times>, {
            src_offset = 0, instance_divisor = 12732516, vertex_buffer_index = 
12981196, 
            src_format = PIPE_FORMAT_NONE}, {src_offset = 12981196, 
instance_divisor = 11836542, 
            vertex_buffer_index = 0, src_format = 12981200}, {src_offset = 
11825707, instance_divisor = 12976116, 
            vertex_buffer_index = 4096, src_format = PIPE_FORMAT_R8_UNORM}, 
{src_offset = 12981976, 
---Type <return> to continue, or q <return> to quit---
            instance_divisor = 11836949, vertex_buffer_index = 124, src_format 
= 12732895}, {src_offset = 110, 
            instance_divisor = 11836542, vertex_buffer_index = 124, src_format 
= PIPE_FORMAT_R16_FLOAT}, {
            src_offset = 56, instance_divisor = 7, vertex_buffer_index = 0, 
src_format = PIPE_FORMAT_NONE}, {
            src_offset = 0, instance_divisor = 72, vertex_buffer_index = 0, 
src_format = PIPE_FORMAT_NONE}, {
            src_offset = 7, instance_divisor = 48, vertex_buffer_index = 
11833814, 
            src_format = PIPE_FORMAT_X8R8G8B8_UNORM}, {src_offset = 3, 
instance_divisor = 56, 
            vertex_buffer_index = 24, src_format = 3085265457}, {src_offset = 
3221220440, 
            instance_divisor = 3085314945, vertex_buffer_index = 64, src_format 
= 135290632}, {
            src_offset = 3221220440, instance_divisor = 48, vertex_buffer_index 
= 135290632, 
            src_format = PIPE_FORMAT_NONE}}
        vb_transfer = {0x82995e0, 0x82a0020, 0x0 <repeats 30 times>}
        ib_transfer = 0x0
        cb_transfer = 0x82a0058
        attr = 2
        i = 0
        mapped_constants = 0x829f000 "\315\314L;"
#10 0xb7defa12 in st_RasterPos (ctx=0x80835a0, v=0xbfffef0c) at 
state_tracker/st_cb_rasterpos.c:254
        st = 0x80c5f00
        draw = 0x80daa80
        rs = 0x829d4a8
#11 0xb7d0543f in rasterpos (x=10, y=10, z=0, w=1) at main/rastpos.c:63
        ctx = 0x80835a0
        p = {10, 10, 0, 1}
#12 0xb7d0550f in _mesa_RasterPos2i (x=10, y=10) at main/rastpos.c:82
No locals.
#13 0x0804a11b in draw () at tunnel.c:450
        frbuf = '\000' <repeats 79 times>
        i = 5
        base = 1000
        offset = 8
---Type <return> to continue, or q <return> to quit---
#14 0xb7f52681 in processWindowWorkList (window=0x8059fe8) at glut_event.c:1307
        workMask = 4
        __PRETTY_FUNCTION__ = "processWindowWorkList"
#15 0xb7f5278c in __glutProcessWindowWorkLists () at glut_event.c:1358
        remainder = 0x0
        work = 0x8059fe8
#16 0xb7f527fd in glutMainLoop () at glut_event.c:1379
No locals.
#17 0x080499bb in main (ac=1, av=0xbffff1d4) at tunnel.c:539
        fogcolor = {0.699999988, 0.699999988, 0.699999988, 1}
(gdb) 
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to