On 9 January 2014 22:17, Chris Forbes <chr...@ijw.co.nz> wrote:

> This is a nice cleanup; I like that this brings both writes to
> prog->LastClipDistanceArraySize together -- but it looks like the
> behavior changes slightly.
>
> Previously, if there was no VS and no GS, then we would never write
> prog->LastClipDistanceArraySize. Now we'll read an old junk value
> (potentially from a previous linking of the same program object with
> different shaders attached) from prog->Vert.ClipDistanceArraySize
> (since we never called validate_vertex_shader_executable) -- but we'll
> never end up actually using it, since it's only used for transform
> feedback of gl_ClipDistance.
>

Yeah, that's a good point.  I agree that it's completely benign, but I
think I could have made things clearer.  I've changed it to this:

   if (num_shaders[MESA_SHADER_GEOMETRY] > 0)
      prog->LastClipDistanceArraySize = prog->Geom.ClipDistanceArraySize;
   else if (num_shaders[MESA_SHADER_VERTEX] > 0)
      prog->LastClipDistanceArraySize = prog->Vert.ClipDistanceArraySize;
   else
      prog->LastClipDistanceArraySize = 0; /* Not used */
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to