[Mesa-dev] Mesa (master): glsl: Make lower_const_arrays_to_uniforms work directly on constants.

Michel Dänzer michel at daenzer.net
Fri Jun 24 06:31:07 UTC 2016


On 24.06.2016 03:59, Kenneth Graunke wrote:
> Module: Mesa
> Branch: master
> Commit: ef78df8d3b0cf540e5f08c8c2f6caa338b64a6c7
> URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ef78df8d3b0cf540e5f08c8c2f6caa338b64a6c7
> 
> Author: Kenneth Graunke <kenneth at whitecape.org>
> Date:   Fri Apr 29 18:05:26 2016 -0700
> 
> glsl: Make lower_const_arrays_to_uniforms work directly on constants.

This change caused all spec at arb_gpu_shader5@texturegatheroffsets tests
to fail an assertion with radeonsi and llvmpipe (needs
MESA_EXTENSION_OVERRIDE="GL_ARB_gpu_shader5" to run these tests). For
example textureGather fs offsets r 0 float 2D repeat:

../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi.c:442:lp_build_emit_fetch_texoffset: Assertion `off->Index <= bld_base->info->file_max[off->File]' failed.

Thread 1 "textureGather" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff0b93f86 in _debug_assert_fail (expr=expr at entry=0x7ffff0fcef88 "off->Index <= bld_base->info->file_max[off->File]", file=file at entry=0x7ffff0fcee78 "../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi.c", line=line at entry=442, 
    function=function at entry=0x7ffff0fcf090 <__func__.11579> "lp_build_emit_fetch_texoffset") at ../../../../src/gallium/auxiliary/util/u_debug.c:330
330	   os_abort();
(gdb) bt
#0  0x00007ffff0b93f86 in _debug_assert_fail (expr=expr at entry=0x7ffff0fcef88 "off->Index <= bld_base->info->file_max[off->File]", file=file at entry=0x7ffff0fcee78 "../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi.c", line=line at entry=442, 
    function=function at entry=0x7ffff0fcf090 <__func__.11579> "lp_build_emit_fetch_texoffset") at ../../../../src/gallium/auxiliary/util/u_debug.c:330
#1  0x00007ffff0cdc051 in lp_build_emit_fetch_texoffset (bld_base=bld_base at entry=0x7fffffff47f0, inst=inst at entry=0xce0a50, tex_off_op=tex_off_op at entry=0, chan_index=chan_index at entry=0) at ../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi.c:442
#2  0x00007ffff0ce3dc0 in emit_tex (modifier=LP_BLD_TEX_MODIFIER_NONE, sampler_op=LP_SAMPLER_OP_GATHER, sampler_reg=2, texel=<optimized out>, inst=0xce0a50, bld=0x7fffffff47f0) at ../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c:2316
#3  tg4_emit (action=<optimized out>, bld_base=0x7fffffff47f0, emit_data=0x7fffffff45e0) at ../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c:3257
#4  0x00007ffff0cdb75a in lp_build_tgsi_inst_llvm (bld_base=bld_base at entry=0x7fffffff47f0, inst=inst at entry=0xce0a50) at ../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi.c:306
#5  0x00007ffff0cdc181 in lp_build_tgsi_llvm (bld_base=bld_base at entry=0x7fffffff47f0, tokens=tokens at entry=0x7f6740) at ../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi.c:517
#6  0x00007ffff0ceac72 in lp_build_tgsi_soa (gallivm=gallivm at entry=0x7f7720, tokens=tokens at entry=0x7f6740, type=..., type at entry=..., mask=mask at entry=0x7fffffffa860, consts_ptr=consts_ptr at entry=0xcb4a28, const_sizes_ptr=const_sizes_ptr at entry=0xcb4ac8, 
    system_values=0x7fffffffa880, inputs=0x7fffffffd570, outputs=0x7fffffffac40, context_ptr=0x7f4590, thread_data_ptr=0x7f2470, sampler=0x7f39a0, info=0xc8a5e0, gs_iface=0x0) at ../../../../src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c:4026
#7  0x00007ffff0ea2ed5 in generate_fs_loop (thread_data_ptr=0x7f2470, facing=0x7f1a40, depth_stride=0x7f24f0, depth_ptr=0x7f23f0, out_color=0x7fffffffaa00, mask_store=0x7fbc78, sampler=0x7f39a0, interp=0x7fffffffb640, num_loop=<optimized out>, 
    context_ptr=0x7f4590, type=..., builder=<optimized out>, key=0x7f7720, shader=0xc8a3b0, gallivm=0x7f7720) at ../../../../../src/gallium/drivers/llvmpipe/lp_state_fs.c:421
#8  generate_fragment (shader=shader at entry=0xc8a3b0, variant=variant at entry=0x7f74a0, partial_mask=partial_mask at entry=1, lp=0x62e0a0) at ../../../../../src/gallium/drivers/llvmpipe/lp_state_fs.c:2367
#9  0x00007ffff0ea57b4 in generate_variant (lp=0x62e0a0, key=0x7fffffffe040, shader=0xc8a3b0) at ../../../../../src/gallium/drivers/llvmpipe/lp_state_fs.c:2619
#10 llvmpipe_update_fs (lp=lp at entry=0x62e0a0) at ../../../../../src/gallium/drivers/llvmpipe/lp_state_fs.c:3179
#11 0x00007ffff0e9aa48 in llvmpipe_update_derived (llvmpipe=llvmpipe at entry=0x62e0a0) at ../../../../../src/gallium/drivers/llvmpipe/lp_state_derived.c:209
#12 0x00007ffff0e6e458 in llvmpipe_draw_vbo (pipe=0x62e0a0, info=0x7fffffffe350) at ../../../../../src/gallium/drivers/llvmpipe/lp_draw_arrays.c:70
#13 0x00007ffff0949d8f in st_draw_vbo (ctx=0x741d70, prims=<optimized out>, nr_prims=<optimized out>, ib=0x0, index_bounds_valid=<optimized out>, min_index=0, max_index=5, tfb_vertcount=0x0, stream=0, indirect=0x0)
    at ../../../src/mesa/state_tracker/st_draw.c:252
#14 0x00007ffff08ff5ce in vbo_draw_arrays (baseInstance=0, numInstances=1, count=6, start=0, mode=4, ctx=0x741d70) at ../../../src/mesa/vbo/vbo_exec_array.c:503
#15 vbo_exec_DrawArrays (mode=4, start=0, count=6) at ../../../src/mesa/vbo/vbo_exec_array.c:655
#16 0x00007ffff7aab9f2 in stub_glDrawArrays (mode=4, first=0, count=6) at tests/util/piglit-dispatch-gen.c:11862
#17 0x0000000000401c3b in piglit_display () at tests/texturing/shaders/textureGather.c:70
#18 0x00007ffff7b3a591 in run_test (gl_fw=0x616c20, argc=8, argv=0x7fffffffe6c8) at tests/util/piglit-framework-gl/piglit_fbo_framework.c:52
#19 0x00007ffff7b20995 in piglit_gl_test_run (argc=8, argv=0x7fffffffe6c8, config=0x7fffffffe590) at tests/util/piglit-framework-gl.c:199
#20 0x0000000000401b17 in main (argc=8, argv=0x7fffffffe6c8) at tests/texturing/shaders/textureGather.c:10


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list