Bug 32905 - [r300g] src/gallium/drivers/r300/r300_state.c:1874:r300_set_constant_buffer: Assertion `(buf->width0 % (4 * sizeof(float))) == 0' failed.
Summary: [r300g] src/gallium/drivers/r300/r300_state.c:1874:r300_set_constant_buffer: ...
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (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: 2011-01-07 12:10 UTC by Vinson Lee
Modified: 2011-01-09 01:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2011-01-07 12:10:43 UTC
mesa: 82acc3b14c2e85b4367bcbbb50f6a7e946050b19 (master)

chipset: RV530 71C5 (ATI Radeon X1600)
system architecture: i686
libdrm-dev: 2.4.21-1ubuntu2.1
kernel version: 2.6.35-24-generic
Linux distribution: Ubuntu 10.10 i386

Run piglit fdo10370 test.

$ ./bin/fdo10370 -auto
radeon: Successfully grabbed chipset info from kernel!
radeon: DRM version: 2.5.0 ID: 0x71c5 GB: 1 Z: 2
radeon: GART size: 509 MB VRAM size: 128 MB
radeon: HyperZ: NO
src/gallium/drivers/r300/r300_state.c:1874:r300_set_constant_buffer: Assertion `(buf->width0 % (4 * sizeof(float))) == 0' failed.
Trace/breakpoint trap


Program terminated with signal 5, Trace/breakpoint trap.
#0  0x01109d6f in _debug_assert_fail (expr=0x1986b44 "(buf->width0 % (4 * sizeof(float))) == 0", file=0x19867dc "src/gallium/drivers/r300/r300_state.c", line=1874, 
    function=0x1986b6d "r300_set_constant_buffer") at src/gallium/auxiliary/util/u_debug.c:234
234	      os_abort();
(gdb) bt
#0  0x01109d6f in _debug_assert_fail (expr=0x1986b44 "(buf->width0 % (4 * sizeof(float))) == 0", file=0x19867dc "src/gallium/drivers/r300/r300_state.c", line=1874, 
    function=0x1986b6d "r300_set_constant_buffer") at src/gallium/auxiliary/util/u_debug.c:234
#1  0x01082953 in r300_set_constant_buffer (pipe=0x8a8a528, shader=0, index=0, buf=0x8a809c0) at src/gallium/drivers/r300/r300_state.c:1874
#2  0x018f27c5 in st_upload_constants (st=0x8aee1d8, params=0x8add398, shader_type=0) at src/mesa/state_tracker/st_atom_constbuf.c:92
#3  0x018f28a4 in update_vs_constants (st=0x8aee1d8) at src/mesa/state_tracker/st_atom_constbuf.c:114
#4  0x018f1a1b in st_validate_state (st=0x8aee1d8) at src/mesa/state_tracker/st_atom.c:196
#5  0x018fd3f5 in st_Clear (ctx=0x8aafa10, mask=1) at src/mesa/state_tracker/st_cb_clear.c:464
#6  0x018874f0 in _mesa_Clear (mask=16384) at src/mesa/main/clear.c:242
#7  0x08049032 in display () at piglit/tests/bugs/fdo10370.c:66
#8  0x00720820 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
#9  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
#10 0x00724660 in fgEnumWindows (enumCallback=0x720790 <fghcbDisplayWindow>, enumerator=0xbfd89dd8) at freeglut_structure.c:394
#11 0x00720cdb in fghDisplayAll () at freeglut_main.c:249
#12 glutMainLoopEvent () at freeglut_main.c:1450
#13 0x00721605 in glutMainLoop () at freeglut_main.c:1498
#14 0x08049678 in main (argc=2, argv=0xbfd8a054) at piglit/tests/bugs/fdo10370.c:170
(gdb) frame 1
#1  0x01082953 in r300_set_constant_buffer (pipe=0x8a8a528, shader=0, index=0, buf=0x8a809c0) at src/gallium/drivers/r300/r300_state.c:1874
1874	        assert((buf->width0 % (4 * sizeof(float))) == 0);
(gdb) print buf->width0
$1 = 4294967295
(gdb) print /x buf->width0
$2 = 0xffffffff
Comment 1 Vinson Lee 2011-01-07 12:16:27 UTC
be1af4394e060677b7db6bbb8e3301e38a3363da is the first bad commit
commit be1af4394e060677b7db6bbb8e3301e38a3363da
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 26 04:29:44 2010 +0100

    r300g: derive user buffer sizes at draw time
    
    This only uploads the [min_index, max_index] range instead of [0, userbuf size],
    which greatly speeds up user buffer uploads.
    
    This is also a prerequisite for atomizing vertex arrays in st/mesa.

:040000 040000 9187e08ae3db4c38d8415d0175a2db364a34f533 8a448bddabc39ed22a122def93d638cddcd4d0c8 M	src
bisect run success
Comment 2 Marek Olšák 2011-01-08 11:58:38 UTC
Fixed with commit 96d8a54716d96bd28f0c54a25ca6904fb4321a55.
Comment 3 Vinson Lee 2011-01-09 01:03:59 UTC
mesa: 21750a2d9d2a4ed69308316b121fd53b0c873aea (master)

Verified fixed.


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.