[Mesa-dev] Mesa (master): glsl: restrict consumer stage condition to modify interpolation type

Samuel Iglesias Gonsálvez siglesias at igalia.com
Thu Jan 14 23:55:00 PST 2016


On Fri, 2016-01-15 at 16:36 +0900, Michel Dänzer wrote:
> On 15.01.2016 15:12, Samuel Iglesias =?UNKNOWN?Q?Gons=C3=A1lvez?=
> wrote:
> > Module: Mesa
> > Branch: master
> > Commit: 781d2787bc1cf975757a95d0d9324f734fa61c09
> > URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=781d2787bc
> > 1cf975757a95d0d9324f734fa61c09
> > 
> > Author: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> > Date:   Tue Jan 12 15:36:56 2016 +0100
> > 
> > glsl: restrict consumer stage condition to modify interpolation
> > type
> > 
> > Only modify interpolation type for integer-based varyings or when
> > the
> > consumer is known and different than fragment shader.
> > 
> > If we are linking separate shader programs and the consumer is
> > unknown,
> > the consumer could be added later and be a fragment shader. If we
> > modify the interpolation type in this case, we could read wrong
> > values in the fragment shader inputs, as shown in bug 93320.
> 
> This change broke 4 GL_ARB_gpu_shader_fp64 piglit tests for me with
> radeonsi. Here's the assertion failure and backtrace for one of them:
> 

Mmm, OK. I am going to check what it is going on here. Maybe I need to
restrict the consumer stage condition only to separate shader objects.

Once I have a patch, I will send it to you privately to test if it is
fixed because I don't a machine with radeonsi driver.

Can you tell me which tests are failing? Perhaps I can reproduce this
issue with llvmpipe.

Sam

> arb_gpu_shader_fp64-tf-separate:
> ../../../src/glsl/lower_packed_varyings.cpp:314: void
> {anonymous}::lower_packed_varyings_visitor::bitwise_assign_pack(ir_rv
> alue*, ir_rvalue*): Assertion `lhs->type->base_type == GLSL_TYPE_INT'
> failed.
> 
> Program received signal SIGABRT, Aborted.
> 0x00007ffff55f8107 in __GI_raise (sig=sig at entry=6)
>     at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> 56	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or
> directory.
> (gdb) bt
> #0  0x00007ffff55f8107 in __GI_raise (sig=sig at entry=6)
>     at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1  0x00007ffff55f94e8 in __GI_abort () at abort.c:89
> #2  0x00007ffff55f1226 in __assert_fail_base (
>     fmt=0x7ffff5727d08 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
>     assertion=assertion at entry=0x7ffff0f68e88 "lhs->type->base_type ==
> GLSL_TYPE_INT", 
>     file=file at entry=0x7ffff0f68e28
> "../../../src/glsl/lower_packed_varyings.cpp", line=line at entry=314, 
>     function=function at entry=0x7ffff0f69080 <(anonymous
> namespace)::lower_packed_varyings_visitor::bitwise_assign_pack(ir_rva
> lue*, ir_rvalue*)::__PRETTY_FUNCTION__> "void
> {anonymous}::lower_packed_varyings_visitor::bitwise_assign_pack(ir_rv
> alue*, ir_rvalue*)") at assert.c:92
> #3  0x00007ffff55f12d2 in __GI___assert_fail (
>     assertion=assertion at entry=0x7ffff0f68e88 "lhs->type->base_type ==
> GLSL_TYPE_INT", 
>     file=file at entry=0x7ffff0f68e28
> "../../../src/glsl/lower_packed_varyings.cpp", line=line at entry=314, 
>     function=function at entry=0x7ffff0f69080 <(anonymous
> namespace)::lower_packed_varyings_visitor::bitwise_assign_pack(ir_rva
> lue*, ir_rvalue*)::__PRETTY_FUNCTION__> "void
> {anonymous}::lower_packed_varyings_visitor::bitwise_assign_pack(ir_rv
> alue*, ir_rvalue*)") at assert.c:101
> #4  0x00007ffff0aa8d62 in (anonymous
> namespace)::lower_packed_varyings_visitor::bitwise_assign_pack
> (rhs=0x829740, lhs=0x837aa0, this=0x7fffffffdd60)
>     at ../../../src/glsl/lower_packed_varyings.cpp:314
> #5  (anonymous
> namespace)::lower_packed_varyings_visitor::lower_rvalue (
>     this=this at entry=0x7fffffffdd60, rvalue=rvalue at entry=0x829740, 
>     fine_location=108, unpacked_var=unpacked_var at entry=0x82ac70, 
>     name=<optimized out>, gs_input_toplevel=<optimized out>,
> vertex_index=0)
>     at ../../../src/glsl/lower_packed_varyings.cpp:523
> #6  0x00007ffff0aa9083 in (anonymous
> namespace)::lower_packed_varyings_visitor::run (shader=0x83e180,
> this=0x7fffffffdd60)
>     at ../../../src/glsl/lower_packed_varyings.cpp:293
> #7  lower_packed_varyings (mem_ctx=mem_ctx at entry=0x821980, 
>     locations_used=locations_used at entry=6, mode=mode at entry=ir_var_sha
> der_out, 
>     gs_input_vertices=gs_input_vertices at entry=0, shader=shader at entry=
> 0x83e180)
>     at ../../../src/glsl/lower_packed_varyings.cpp:724
> #8  0x00007ffff0a91087 in assign_varying_locations (ctx=ctx at entry=0x7
> 9ba60, 
>     mem_ctx=mem_ctx at entry=0x821980, prog=prog at entry=0x831070, 
>     producer=producer at entry=0x83e180, consumer=consumer at entry=0x0, 
>     num_tfeedback_decls=num_tfeedback_decls at entry=4,
> tfeedback_decls=0x82a290)
>     at ../../../src/glsl/link_varyings.cpp:1798
> #9  0x00007ffff0a98366 in link_shaders (ctx=ctx at entry=0x79ba60, 
>     prog=prog at entry=0x831070) at ../../../src/glsl/linker.cpp:4496
> #10 0x00007ffff09c198b in _mesa_glsl_link_shader (ctx=ctx at entry=0x79b
> a60, 
>     prog=prog at entry=0x831070) at
> ../../../src/mesa/program/ir_to_mesa.cpp:2958
> #11 0x00007ffff089d8ee in link_program (program=<optimized out>,
> ctx=0x79ba60)
>     at ../../../src/mesa/main/shaderapi.c:1048
> #12 _mesa_LinkProgram (programObj=<optimized out>)
>     at ../../../src/mesa/main/shaderapi.c:1520
> #13 0x00007ffff7acf24e in stub_glLinkProgram (program=2)
>     at tests/util/piglit-dispatch-gen.c:32599
> #14 0x0000000000401841 in piglit_init (argc=1, argv=0x7fffffffe748)
>     at tests/spec/arb_gpu_shader_fp64/execution/tf-separate.c:96
> #15 0x00007ffff7b3cfc8 in run_test (gl_fw=0x614c20, argc=1, 
>     argv=0x7fffffffe748)
>     at tests/util/piglit-framework-gl/piglit_fbo_framework.c:50
> #16 0x00007ffff7b23557 in piglit_gl_test_run (argc=1,
> argv=0x7fffffffe748, 
>     config=0x7fffffffe610) at tests/util/piglit-framework-gl.c:199
> #17 0x0000000000401710 in main (argc=1, argv=0x7fffffffe748)
>     at tests/spec/arb_gpu_shader_fp64/execution/tf-separate.c:42
> 
> 



More information about the mesa-dev mailing list