[Piglit] [PATCH] Add tests of whole-array assignment and out/inout params.

Brian Paul brian.e.paul at gmail.com
Mon Sep 12 16:23:22 PDT 2011


On Mon, Sep 12, 2011 at 5:12 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> In GLSL 1.10, whole arrays are not lvalues (even though their elements
> are).  This means it is illegal to use an array on the left hand side
> of an assigment, or to use it as an out or inout parameter of a
> function.

So you're saying this is illegal:

#version 110
void zero_array(out float array[5])
{
   int i;
   for (i=0;i<5;i++)
      array[i] = 0.0;
}

It compiles with NVIDIA's driver, FWIW.

-Brian


More information about the Piglit mailing list