Bug 32366 - [r600g] SIGSEGV src/gallium/drivers/r600/r600_state.c:143
Summary: [r600g] SIGSEGV src/gallium/drivers/r600/r600_state.c:143
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium critical
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-13 17:31 UTC by Vinson Lee
Modified: 2010-12-14 18:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2010-12-13 17:31:43 UTC
mesa: bb045d339b53f7ddd42bfca363e3d589b0ddcf20 (master)

chipset: RV620
system architecture: i686
libdrm-dev: 2.14.21-1ubuntu2.1
kernel version: 2.6.35-23-generic
Linux distribution: Ubuntu 10.10 i386

Run piglit draw-vertices test. The test now crashes but previously ran to completion.

$ ./bin/draw-vertices
Ubyte colors - components: 3, stride: 3, offset: 0
Probe at (5,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 0.000000 0.000000
Ubyte colors - components: 3, stride: 4, offset: 0
Ubyte colors - components: 4, stride: 4, offset: 0
Ubyte colors - components: 3, stride: 3, offset: 1
Probe at (65,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 0.000000 0.000000
Ubyte colors - components: 3, stride: 4, offset: 1
Probe at (85,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 1.000000 0.000000
Ubyte colors - components: 4, stride: 4, offset: 1
Probe at (105,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 1.000000 0.000000
Ubyte colors - components: 3, stride: 3, offset: 2
Probe at (125,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 0.000000 0.000000
Ubyte colors - components: 3, stride: 4, offset: 2
Probe at (145,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 0.000000 1.000000
Ubyte colors - components: 4, stride: 4, offset: 2
Probe at (165,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 0.000000 1.000000
Ubyte colors - components: 3, stride: 3, offset: 3
Probe at (185,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 0.000000 0.000000
Ubyte colors - components: 3, stride: 4, offset: 3
Probe at (205,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 0.000000 0.000000
Ubyte colors - components: 4, stride: 4, offset: 3
Probe at (225,5)
  Expected: 1.000000 0.000000 0.000000
  Observed: 0.000000 0.000000 0.000000
Short vertices - components: 2, stride: 4, offset: 0
Short vertices - components: 2, stride: 6, offset: 0
Short vertices - components: 3, stride: 6, offset: 0
Short vertices - components: 2, stride: 8, offset: 0
Short vertices - components: 3, stride: 8, offset: 0
Short vertices - components: 4, stride: 8, offset: 0
Short vertices - components: 2, stride: 4, offset: 2
Probe at (45,25)
  Expected: 1.000000 1.000000 1.000000
  Observed: 0.200000 0.200000 0.200000
Short vertices - components: 2, stride: 6, offset: 2
Probe at (65,25)
  Expected: 1.000000 1.000000 1.000000
  Observed: 0.200000 0.200000 0.200000
Short vertices - components: 3, stride: 6, offset: 2
Probe at (85,25)
  Expected: 1.000000 1.000000 1.000000
  Observed: 0.200000 0.200000 0.200000
Short vertices - components: 2, stride: 8, offset: 2
Probe at (105,25)
  Expected: 1.000000 1.000000 1.000000
  Observed: 0.200000 0.200000 0.200000
Short vertices - components: 3, stride: 8, offset: 2
Probe at (125,25)
  Expected: 1.000000 1.000000 1.000000
  Observed: 0.200000 0.200000 0.200000
Short vertices - components: 4, stride: 8, offset: 2
Probe at (145,25)
  Expected: 1.000000 1.000000 1.000000
  Observed: 0.200000 0.200000 0.200000
Int vertices
Double vertices
Segmentation fault (core dumped)


(gdb) bt
#0  0x01027b9f in r600_vertex_buffer_update (rctx=0x833fd40) at src/gallium/drivers/r600/r600_state.c:143
#1  0x0102cdb1 in r600_bind_vertex_elements (ctx=0x833fd40, state=0x86f2138) at src/gallium/drivers/r600/r600_state_common.c:129
#2  0x01030663 in r600_begin_vertex_translate (rctx=0x833fd40) at src/gallium/drivers/r600/r600_translate.c:163
#3  0x01027bb5 in r600_vertex_buffer_update (rctx=0x833fd40) at src/gallium/drivers/r600/r600_state.c:147
#4  0x0102cdb1 in r600_bind_vertex_elements (ctx=0x833fd40, state=0x86f0ca8) at src/gallium/drivers/r600/r600_state_common.c:129
#5  0x01297a68 in cso_set_vertex_elements (ctx=0x86a4fd8, count=1, states=0xbfb50604) at src/gallium/auxiliary/cso_cache/cso_context.c:1126
#6  0x0117e0eb in st_draw_vbo (ctx=0x86514a0, arrays=0x8693528, prims=0xbfb50aac, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, 
    max_index=2) at src/mesa/state_tracker/st_draw.c:702
#7  0x01202f7d in vbo_draw_arrays (ctx=0x86514a0, mode=4, start=0, count=3, numInstances=1) at src/mesa/vbo/vbo_exec_array.c:588
#8  0x012030e4 in vbo_exec_DrawArrays (mode=4, start=0, count=3) at src/mesa/vbo/vbo_exec_array.c:619
#9  0x0804c206 in test_double_vertices ()
#10 0x0804c2cd in piglit_display ()
#11 0x0804e37f in display ()
#12 0x00125820 in fghRedrawWindow (window=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
) at freeglut_main.c:210
#13 fghcbDisplayWindow (window=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
) at freeglut_main.c:227
#14 0x00129660 in fgEnumWindows (enumCallback=0x125790 <fghcbDisplayWindow>, enumerator=0xbfb50cc8) at freeglut_structure.c:394
#15 0x00125cdb in fghDisplayAll () at freeglut_main.c:249
#16 glutMainLoopEvent () at freeglut_main.c:1450
#17 0x00126605 in glutMainLoop () at freeglut_main.c:1498
#18 0x0804e528 in main ()
(gdb) frame 0
#0  0x01027b9f in r600_vertex_buffer_update (rctx=0x833fd40) at src/gallium/drivers/r600/r600_state.c:143
143		if (rctx->vertex_elements->incompatible_layout) {
(gdb) print rctx->vertex_elements
$1 = (struct r600_vertex_element *) 0x0
Comment 1 Vinson Lee 2010-12-13 17:44:01 UTC
fa86fc564aea4e40c89f6fc889e6a5bf817634b3 is the first bad commit
commit fa86fc564aea4e40c89f6fc889e6a5bf817634b3
Author: Jerome Glisse <jglisse@redhat.com>
Date:   Fri Dec 3 20:47:02 2010 -0500

    r600g: build fetch shader from vertex elements
    
    Vertex elements change are less frequent than draw call, those to
    avoid rebuilding fetch shader to often build the fetch shader along
    vertex elements. This also allow to move vertex buffer setup out
    of draw path and make update to it less frequent.
    
    Shader update can still be improved to only update SPI regs (based
    on some rasterizer state like flat shading or point sprite ...).
    
    Signed-off-by: Jerome Glisse <jglisse@redhat.com>

:040000 040000 ebf22a869bb3385b6ee14acf5669ee4bdcd4f931 0fee279b293bd89ba4a56c2a925e252aafb02d86 M	src
bisect run success
Comment 2 Jerome Glisse 2010-12-14 10:53:54 UTC
Fix pushed
Comment 3 Vinson Lee 2010-12-14 18:15:48 UTC
mesa: a8ca30bc58b73203a83799149ca9d21bcdce74b5 (master)

piglit draw-vertices runs to completion.


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.