Created attachment 37927 [details] Test case When attempting to link a program object using a single vertex shader that has a 'varying' object, the GLSL linker instantly aborts: varycrash: program/ir_to_mesa.cpp:1467: virtual void ir_to_mesa_visitor::visit(ir_dereference_variable*): Assertion `ir->var->location != -1' failed. This is a regression from mesa 7.8, presumably due to the recent glsl2 merge. I can bisect it later if necessary. Occurs on at least swrast and i965.
I add a piglit shader_runner test glsl-vs-ff-frag that reproduces this bug. I think I know what might be causing this. When linking a vertex shader and a fragment shader, all varyings that are written but not read are marked as not being varying. When there's only a vertex shader, this pass never happens. This means the linker should be modified to do at least the demoting of varyings in the VS-only case.
commit 40e114b5dc60c5e196a86e33c2436b099ed9f392 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Tue Aug 17 14:55:50 2010 -0700 linker: Demote user-defined varyings in the VS-only case Fixes piglit test case glsl-vs-ff-frag and bugzilla #29623.
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.