mesa: d06cc42c3c85382600176d118d8bf492b4de6a55 (master) Run piglit fdo23670-drawpix_stencil on softpipe. $ ./bin/fdo23670-drawpix_stencil -auto Segmentation fault (core dumped) (gdb) bt #0 0x00000000 in ?? () #1 0x00424b82 in util_format_read_4ui (format=PIPE_FORMAT_S8_UINT, dst=0xb7161024, dst_stride=1024, src=0x942fac0, src_stride=20, x=0, y=0, w=20, h=20) at util/u_format.c:316 #2 0x004359bd in pipe_tile_raw_to_unsigned (format=PIPE_FORMAT_S8_UINT, src=0x942fac0, w=20, h=20, dst=0xb7161024, dst_stride=256) at util/u_tile.c:398 #3 0x00436871 in pipe_get_tile_ui_format (pipe=0x92375a0, pt=0x942f900, x=0, y=0, w=20, h=20, format=PIPE_FORMAT_S8_UINT, p=0xb7161024) at util/u_tile.c:794 #4 0x0018e2e0 in sp_find_cached_tile_tex (tc=0xb7161008, addr=...) at sp_tex_tile_cache.c:295 #5 0x001869ea in sp_get_cached_tile_tex (tc=0xb7161008, addr=...) at sp_tex_tile_cache.h:160 #6 0x00188169 in get_texel_2d_no_border (samp=0x939bad0, addr=..., x=0, y=19) at sp_tex_sample.c:660 #7 0x0018821b in get_texel_2d (samp=0x939bad0, addr=..., x=0, y=19) at sp_tex_sample.c:678 #8 0x00189136 in img_filter_2d_nearest (tgsi_sampler=0x939bad0, s=0xbfd42e90, t=0xbfd42ea0, p=0xbfd42eb0, c0=0x58afa4, control=tgsi_sampler_lod_bias, rgba=0xbfd42e0c) at sp_tex_sample.c:1114 #9 0x0040fdce in fetch_texel (sampler=0x939bad0, s=0xbfd42e90, t=0xbfd42ea0, p=0xbfd42eb0, c0=0x58afa4, control=tgsi_sampler_lod_bias, r=0xbfd42e90, g=0xbfd42ea0, b=0xbfd42eb0, a=0xbfd42ec0) at tgsi/tgsi_exec.c:1717 #10 0x004100ed in exec_tex (mach=0x92db480, inst=0x942ea00, modifier=0) at tgsi/tgsi_exec.c:1787 #11 0x0041617e in exec_instruction (mach=0x92db480, inst=0x942ea00, pc=0xbfd42fe8) at tgsi/tgsi_exec.c:3602 #12 0x004182e0 in tgsi_exec_machine_run (mach=0x92db480) at tgsi/tgsi_exec.c:4226 #13 0x0018fe6d in exec_run (var=0x942db58, machine=0x92db480, quad=0x932a4f8) at sp_fs_exec.c:133 #14 0x0017a0cd in shade_quad (qs=0x92f0b98, quad=0x932a4f8) at sp_quad_fs.c:77 #15 0x0017a272 in shade_quads (qs=0x92f0b98, quads=0x932c8b8, nr=1) at sp_quad_fs.c:130 #16 0x001803c1 in flush_spans (setup=0x932a490) at sp_setup.c:243 #17 0x00181433 in subtriangle (setup=0x932a490, eleft=0x932a4a4, eright=0x932a4d4, lines=20) at sp_setup.c:752 #18 0x001816ad in sp_setup_tri (setup=0x932a490, v0=0x942f810, v1=0x942f840, v2=0x942f8a0) at sp_setup.c:847 #19 0x00175fe7 in sp_vbuf_draw_arrays (vbr=0x932a438, start=0, nr=4) at sp_prim_vbuf.c:474 #20 0x00476564 in draw_pt_emit_linear (emit=0x92fb5f0, vert_info=0xbfd43308, prim_info=0xbfd4336c) at draw/draw_pt_emit.c:265 #21 0x003f1d51 in emit (emit=0x92fb5f0, vert_info=0xbfd43308, prim_info=0xbfd4336c) at draw/draw_pt_fetch_shade_pipeline.c:169 #22 0x003f2065 in fetch_pipeline_generic (middle=0x92fb540, fetch_info=0x0, prim_info=0xbfd4336c) at draw/draw_pt_fetch_shade_pipeline.c:287 #23 0x003f215d in fetch_pipeline_linear_run (middle=0x92fb540, start=0, count=4, prim_flags=0) at draw/draw_pt_fetch_shade_pipeline.c:346 #24 0x003f765e in vsplit_segment_simple_linear (vsplit=0x92f8a58, flags=0, istart=0, icount=4) at draw/draw_pt_vsplit_tmp.h:237 #25 0x003f79a6 in vsplit_run_linear (frontend=0x92f8a58, start=0, count=4) at draw/draw_split_tmp.h:61 #26 0x003ef8eb in draw_pt_arrays (draw=0x92f1438, prim=7, start=0, count=4) at draw/draw_pt.c:113 #27 0x003f0425 in draw_vbo (draw=0x92f1438, info=0xbfd43534) at draw/draw_pt.c:491 #28 0x001749e6 in softpipe_draw_vbo (pipe=0x92375a0, info=0xbfd43534) at sp_draw_arrays.c:143 #29 0x00423e4c in util_draw_arrays (pipe=0x92375a0, mode=7, start=0, count=4) at ./util/u_draw.h:63 #30 0x00423f23 in util_draw_vertex_buffer (pipe=0x92375a0, cso=0x939e488, vbuf=0x939b8d8, offset=0, prim_type=7, num_verts=4, num_attribs=3) at util/u_draw_quad.c:69 #31 0x003a59ba in draw_quad (ctx=0x932f9b8, x0=50, y0=50, z=0, x1=70, y1=70, color=0x9330b24, invertTex=0 '\000', maxXcoord=1, maxYcoord=1) at state_tracker/st_cb_drawpixels.c:630 #32 0x003a5ff6 in draw_textured_quad (ctx=0x932f9b8, x=50, y=50, z=0, width=20, height=20, zoomX=1, zoomY=1, sv=0xbfd43830, num_sampler_view=2, driver_vp=0x939e2e8, driver_fp=0x937e168, color=0x9330b24, invertTex=0 '\000', write_depth=0 '\000', write_stencil=1 '\001') at state_tracker/st_cb_drawpixels.c:781 #33 0x003a70bf in st_DrawPixels (ctx=0x932f9b8, x=50, y=50, width=20, height=20, format=6401, type=5121, unpack=0x933e3e0, pixels=0xbfd4391c) at state_tracker/st_cb_drawpixels.c:1139 #34 0x00341f04 in _mesa_DrawPixels (width=20, height=20, format=6401, type=5121, pixels=0xbfd4391c) at main/drawpix.c:113 #35 0x0806a490 in piglit_display () at piglit/tests/bugs/fdo23670-drawpix_stencil.c:68 #36 0x0806a58f in display () at piglit/tests/util/piglit-framework.c:56 #37 0x00830820 in fghRedrawWindow (window=0x9236808, enumerator=0xbfd43b98) at freeglut_main.c:210 #38 fghcbDisplayWindow (window=0x9236808, enumerator=0xbfd43b98) at freeglut_main.c:227 #39 0x00834660 in fgEnumWindows (enumCallback=0x830790 <fghcbDisplayWindow>, enumerator=0xbfd43b98) at freeglut_structure.c:394 #40 0x00830cdb in fghDisplayAll () at freeglut_main.c:249 #41 glutMainLoopEvent () at freeglut_main.c:1450 #42 0x00831605 in glutMainLoop () at freeglut_main.c:1498 #43 0x0806ac91 in main (argc=1, argv=0xbfd43e24) at piglit/tests/util/piglit-framework.c:294 (gdb) frame 1 #1 0x00fa9b82 in util_format_read_4ui (format=PIPE_FORMAT_S8_UINT, dst=0xb70c9024, dst_stride=1024, src=0x90b09b8, src_stride=20, x=0, y=0, w=20, h=20) at util/u_format.c:316 316 format_desc->unpack_rgba_uint(dst_row, dst_stride, src_row, src_stride, w, h); (gdb) print format_desc->unpack_rgba_uint $1 = (void (*)(unsigned int *, unsigned int, const uint8_t *, unsigned int, unsigned int, unsigned int)) 0
396ac41fc285f0d7c8545f2b32ba373693a7a326 is the first bad commit commit 396ac41fc285f0d7c8545f2b32ba373693a7a326 Author: Dave Airlie <airlied@redhat.com> Date: Mon Sep 19 15:05:51 2011 +0100 softpipe: add integer support This adds support to the clear and tile caches for integer storage and clearing, avoiding any floating paths. Signed-off-by: Dave Airlie <airlied@redhat.com> :040000 040000 de153dc01ce975df5a679bd57fa6d3620162976a 4b5254f259725df2211c971683410571276c1d38 M src bisect run success
The problem is the util_format_is_pure_uint() function is returning TRUE for PIPE_FORMAT_S8_UINT but there's no unpack_rgba_uint() method for that format. Is stencil supposed to be considered as a pure uint format? I suspect not. We should probably add some assertions somewhere in the code to checks that if a format is pure uint/sint/etc that it defines the right pack/unpack methods.
(In reply to comment #2) > The problem is the util_format_is_pure_uint() function is returning TRUE for > PIPE_FORMAT_S8_UINT but there's no unpack_rgba_uint() method for that format. > > Is stencil supposed to be considered as a pure uint format? I suspect not. > > We should probably add some assertions somewhere in the code to checks that if > a format is pure uint/sint/etc that it defines the right pack/unpack methods. yeah I didn't meant to push softpipe bits yet, I'll fix it today. Either need to make S8 UINT a pure integer or just fix the tests to not return pure int for ZS colorspace.
mesa: ec174a424489664626796126f937fbce3e7d8cd8 (master) Retested. fdo23670-drawpix_stencil passes on softpipe now.
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.