Bug 110454 - [llvmpipe] piglit arb_color_buffer_float-render GL_RGBA8_SNORM failure with llvm-9
Summary: [llvmpipe] piglit arb_color_buffer_float-render GL_RGBA8_SNORM failure with l...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/llvmpipe (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: have-backtrace
Depends on:
Blocks:
 
Reported: 2019-04-16 20:06 UTC by Vinson Lee
Modified: 2019-04-17 15:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2019-04-16 20:06:44 UTC
$ ./bin/arb_color_buffer_float-render GL_RGBA8_SNORM -auto
Testing 8-bit signed normalized fixed-point FBO
llvm (version 0x900) found no intrinsic for llvm.x86.sse2.padds.b, going to crash...
Aborted (core dumped)

(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007f6278620535 in __GI_abort () at abort.c:79
#2  0x00007f627612f842 in lp_build_intrinsic (builder=0x55993be66240, name=0x7f62776958f8 "llvm.x86.sse2.padds.b", ret_type=0x55993be4b2c0, args=0x7ffc22994420, num_args=2, attr_mask=0) at src/gallium/auxiliary/gallivm/lp_bld_intr.c:251
#3  0x00007f627612f991 in lp_build_intrinsic_binary (builder=0x55993be66240, name=0x7f62776958f8 "llvm.x86.sse2.padds.b", ret_type=0x55993be4b2c0, a=0x55993be5a6c8, b=0x55993bf22368) at src/gallium/auxiliary/gallivm/lp_bld_intr.c:291
#4  0x00007f6276119be3 in lp_build_add (bld=0x7ffc229946e0, a=0x55993be5a6c8, b=0x55993bf22368) at src/gallium/auxiliary/gallivm/lp_bld_arit.c:586
#5  0x00007f62759cbab2 in lp_build_blend_func (bld=0x7ffc229946e0, func=0, term1=0x55993be5a6c8, term2=0x55993bf22368) at src/gallium/drivers/llvmpipe/lp_bld_blend.c:154
#6  0x00007f62759cc153 in lp_build_blend (bld=0x7ffc229946e0, func=0, factor_src=1, factor_dst=1, src=0x55993be5a6c8, dst=0x55993bf22368, src_factor=0x55993be5c600, dst_factor=0x55993be5c600, not_alpha_dependent=1 '\001', optimise_only=0 '\000')
    at src/gallium/drivers/llvmpipe/lp_bld_blend.c:314
#7  0x00007f62759cb3f8 in lp_build_blend_aos (gallivm=0x55993be5be60, blend=0x55993bf31284, cbuf_format=PIPE_FORMAT_R8G8B8A8_SNORM, type=..., rt=0, src=0x55993be5a6c8, src_alpha=0x0, src1=0x0, src1_alpha=0x0, dst=0x55993bf22368, mask=0x55993be71f68, const_=0x55993be86f58, 
    const_alpha=0x0, swizzle=0x7ffc22994db4 "", nr_channels=4) at src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c:388
#8  0x00007f62759bec2a in generate_unswizzled_blend (gallivm=0x55993be5be60, rt=0, variant=0x55993bf31270, out_format=PIPE_FORMAT_R8G8B8A8_SNORM, num_fs=2, fs_type=..., fs_mask=0x7ffc22994fa0, fs_out_color=0x7ffc22995270, context_ptr=0x55993bf9ff20, color_ptr=0x55993be9c668, 
    stride=0x55993bf0a858, partial_mask=1, do_branch=0 '\000') at src/gallium/drivers/llvmpipe/lp_state_fs.c:2330
#9  0x00007f62759c004f in generate_fragment (lp=0x55993bc199f0, shader=0x55993be3af20, variant=0x55993bf31270, partial_mask=1) at src/gallium/drivers/llvmpipe/lp_state_fs.c:2691
#10 0x00007f62759c0c16 in generate_variant (lp=0x55993bc199f0, shader=0x55993be3af20, key=0x7ffc22998120) at src/gallium/drivers/llvmpipe/lp_state_fs.c:2872
#11 0x00007f62759c23f0 in llvmpipe_update_fs (lp=0x55993bc199f0) at src/gallium/drivers/llvmpipe/lp_state_fs.c:3451
#12 0x00007f62759b6df6 in llvmpipe_update_derived (llvmpipe=0x55993bc199f0) at src/gallium/drivers/llvmpipe/lp_state_derived.c:210
#13 0x00007f62759915c6 in llvmpipe_draw_vbo (pipe=0x55993bc199f0, info=0x7ffc229988c0) at src/gallium/drivers/llvmpipe/lp_draw_arrays.c:70
#14 0x00007f627604c9bf in cso_draw_vbo (cso=0x55993be08910, info=0x7ffc229988c0) at src/gallium/auxiliary/cso_cache/cso_context.c:1708
#15 0x00007f6275c2da3b in st_draw_vbo (ctx=0x55993bc6d2a0, prims=0x7ffc22998980, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3, tfb_vertcount=0x0, stream=0, indirect=0x0) at src/mesa/state_tracker/st_draw.c:271
#16 0x00007f6275c99429 in _mesa_draw_arrays (ctx=0x55993bc6d2a0, mode=5, start=0, count=4, numInstances=1, baseInstance=0, drawID=0) at src/mesa/main/draw.c:374
#17 0x00007f6275c99eea in _mesa_DrawArrays (mode=5, start=0, count=4) at src/mesa/main/draw.c:531
#18 0x00007f62789448cd in piglit_draw_rect_from_arrays (verts=0x7ffc22998a80, tex=0x0, use_patches=false, instance_count=1) at tests/util/piglit-util-gl.c:701
#19 0x00007f6278944d4d in piglit_draw_rect_custom (x=-1, y=-1, w=1, h=1, use_patches=false, instance_count=1) at tests/util/piglit-util-gl.c:823
#20 0x00007f6278944da3 in piglit_draw_rect (x=-1, y=-1, w=1, h=1) at tests/util/piglit-util-gl.c:832
#21 0x000055993b22d700 in test_one (vert_clamp=0, frag_clamp=0, semantic=0, blend=3, logicop=0, vpmode=0, fpmode=0) at tests/spec/arb_color_buffer_float/render.c:146
#22 0x000055993b22dc1b in test () at tests/spec/arb_color_buffer_float/render.c:233
#23 0x000055993b22c63a in run_test () at tests/spec/arb_color_buffer_float/common.h:172
#24 0x000055993b22ca71 in piglit_display () at tests/spec/arb_color_buffer_float/common.h:291
#25 0x00007f627896f350 in process_next_event (x11_fw=0x55993bbf3810) at tests/util/piglit-framework-gl/piglit_x11_framework.c:137
#26 0x00007f627896f410 in enter_event_loop (winsys_fw=0x55993bbf3810) at tests/util/piglit-framework-gl/piglit_x11_framework.c:153
#27 0x00007f627896db83 in run_test (gl_fw=0x55993bbf3810, argc=2, argv=0x7ffc22999f48) at tests/util/piglit-framework-gl/piglit_winsys_framework.c:88
#28 0x00007f627894f568 in piglit_gl_test_run (argc=2, argv=0x7ffc22999f48, config=0x7ffc22999e00) at tests/util/piglit-framework-gl.c:229
#29 0x000055993b22c2d9 in main (argc=2, argv=0x7ffc22999f48) at tests/spec/arb_color_buffer_float/common.h:44
(gdb) frame 2
#2  0x00007f627612f842 in lp_build_intrinsic (builder=0x55993be66240, name=0x7f62776958f8 "llvm.x86.sse2.padds.b", ret_type=0x55993be4b2c0, args=0x7ffc22994420, num_args=2, attr_mask=0) at src/gallium/auxiliary/gallivm/lp_bld_intr.c:251
251	         abort();
Comment 1 Roland Scheidegger 2019-04-16 21:02:38 UTC
Ok so the x86 signed add/sub intrinsics got removed.
Thankfully it seems like llvm actually has grown new generic intrinsics for saturated sub/add, so I suppose we should use these instead.
I'll post a patch soon...
Comment 2 Roland Scheidegger 2019-04-17 15:44:50 UTC
Fixed by dded2edf8bedb9a5bafd7788e52dc8e714527186.


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.