Bug 31909 - [i965] brw_fs.cpp:1461: void fs_visitor::emit_bool_to_cond_code(ir_rvalue*): Assertion `expr->operands[i]->type->is_scalar()' failed.
[i965] brw_fs.cpp:1461: void fs_visitor::emit_bool_to_cond_code(ir_rvalue*): ...
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
x86 (IA32) Linux (All)
: medium critical
Assigned To: Eric Anholt
Depends on:
  Show dependency treegraph
Reported: 2010-11-24 23:46 UTC by Vinson Lee
Modified: 2010-12-10 23:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2010-11-24 23:46:06 UTC
mesa: 2cc79acc1ab5cdaadc427526a146c2c27ee0f906 (master)

chipset: G45/G43 (Intel GMA X4500)
system architure: i686
xserver-xorg-video-intel: 2:2.12.0-1ubuntu5
libdrm-intel1: 2.4.21-1ubuntu2.1
kernel version: 2.6.35-22-generic
Linux distribution: Ubuntu 10.10 i386

Run piglit glsl-array-compare-02 test.

$ ./bin/shader_runner tests/shaders/glsl-array-compare-02.shader_test -auto
shader_runner: brw_fs.cpp:1461: void fs_visitor::emit_bool_to_cond_code(ir_rvalue*): Assertion `expr->operands[i]->type->is_scalar()' failed.

(gdb) bt
#0  0x00837416 in __kernel_vsyscall ()
#1  0x006d9941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x006dce42 in abort () at abort.c:92
#3  0x006d28e8 in __assert_fail (assertion=0x1142638 "expr->operands[i]->type->is_scalar()", file=0x11420e1 "brw_fs.cpp", line=1461, 
    function=0x1143740 "void fs_visitor::emit_bool_to_cond_code(ir_rvalue*)") at assert.c:81
#4  0x00f4b6b8 in fs_visitor::emit_bool_to_cond_code (this=0xbf969f14, ir=0x89be868) at brw_fs.cpp:1461
#5  0x00f58190 in fs_visitor::visit (this=0xbf969f14, ir=0x87593e8) at brw_fs.cpp:1665
#6  0x010b0648 in ir_if::accept (this=0x87593e8, v=0xbf969f14) at ir.h:544
#7  0x00f49142 in fs_visitor::visit (this=0xbf969f14, ir=0x8a9f650) at brw_fs.cpp:1806
#8  0x010b0618 in ir_function::accept (this=0x8a9f650, v=0xbf969f14) at ir.h:472
#9  0x00f5ca77 in brw_wm_fs_emit (brw=0x84098e0, c=0xb735b008) at brw_fs.cpp:3539
#10 0x00f3308e in do_wm_prog (brw=0x84098e0) at brw_wm.c:173
#11 brw_prepare_wm_prog (brw=0x84098e0) at brw_wm.c:455
#12 0x00f283ff in brw_validate_state (brw=0x84098e0) at brw_state_upload.c:397
#13 0x00f157de in brw_try_draw_prims (ctx=0x84098e0, arrays=0x844d1a8, prim=0xbf96a338, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3) at brw_draw.c:361
#14 brw_draw_prims (ctx=0x84098e0, arrays=0x844d1a8, prim=0xbf96a338, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3) at brw_draw.c:446
#15 0x01006874 in vbo_draw_arrays (ctx=0x84098e0, mode=<value optimized out>, start=0, count=4, numInstances=1) at vbo/vbo_exec_array.c:588
#16 0x0804dfe8 in piglit_draw_rect ()
#17 0x0804c1e7 in piglit_display ()
#18 0x0804eb4b in display ()
#19 0x003de820 in fghRedrawWindow (window=0x83fb950, enumerator=0xbf96a5d8) at freeglut_main.c:210
#20 fghcbDisplayWindow (window=0x83fb950, enumerator=0xbf96a5d8) at freeglut_main.c:227
#21 0x003e2660 in fgEnumWindows (enumCallback=0x3de790 <fghcbDisplayWindow>, enumerator=0xbf96a5d8) at freeglut_structure.c:394
#22 0x003decdb in fghDisplayAll () at freeglut_main.c:249
#23 glutMainLoopEvent () at freeglut_main.c:1450
#24 0x003df605 in glutMainLoop () at freeglut_main.c:1498
#25 0x0804ecf4 in main ()
Comment 1 Eric Anholt 2010-11-30 11:44:24 UTC
commit ff79633d9f930e396933a0ad9564824ec73ea4dc
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Nov 30 11:23:28 2010 -0800

    glsl: Fix structure and array comparisions.
    We were trying to emit a single ir_expression to compare the whole
    thing.  The backends (ir_to_mesa.cpp and brw_fs.cpp so far) expected
    ir_binop_any_nequal or ir_binop_all_equal to apply to at most a vector
    (with matrices broken down by the lowering pass).  Break them down to
    a bunch of ORed or ANDed any_nequals/all_equals.
    Bug #31909
Comment 2 Vinson Lee 2010-12-10 23:31:27 UTC
mesa: 9e1fbd3d6e2a8accd0ebdc5937dd6eb7a8ef9b10 (master)

piglit glsl-array-compare-02 test passes.