OSDN Git Service

glsl: fix link failure for variable-indexed varying output arrays
authorBrian Paul <brianp@vmware.com>
Wed, 18 Feb 2009 21:24:14 +0000 (14:24 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Feb 2009 21:28:44 +0000 (14:28 -0700)
commitdac19f17f360b730a0e6d651ef2e5b03c59b9b53
tree1f78e6d06138398ee5ffe26ed9fe8e88529dde9c
parentbe3813d58adc0060c9f7a13ac7865217b96ea477
glsl: fix link failure for variable-indexed varying output arrays

If the vertex shader writes to a varying array with a variable index,
mark all the elements of that array as being written.

For example, if the vertex shader does:

   for (i = 0; i < 4; i++)
      gl_TexCoord[i] = expr;

Mark all texcoord outputs as being written, not just the first.

Linking will fail if a fragment shader tries to read an input that's not
written by the vertex shader.  Before this fix, this linker test could fail.
src/mesa/shader/slang/slang_link.c