On Thu, 12 Apr 2012 17:25:37 -0700, "Ian Romanick" <i...@freedesktop.org> wrote:
> +   if (val->type->is_array()) {
> +      const enum glsl_base_type base_type =
> +      val->array_elements[0]->type->base_type;
> +      const unsigned int elements = 
> val->array_elements[0]->type->components();
> +      unsigned int idx = 0;
> +
> +      assert(val->type->length >= storage->array_elements);
> +      for (unsigned int i = 0; i < storage->array_elements; i++) {
> +      copy_constant_to_storage(& storage->storage[idx],
> +                               val->array_elements[i],
> +                               base_type,
> +                               elements);
> +
> +      idx += elements;
> +      }

Wouldn't an array of structures with a uniform initializer fail?  I
think you can have those.

Attachment: pgp9nCFeRrOVv.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to