[Piglit] [PATCH 2/2] Verify that built-in shader inputs are read-only.

Paul Berry stereotype441 at gmail.com
Fri Nov 11 15:22:04 PST 2011


On 10 November 2011 15:47, Chad Versace <chad.versace at linux.intel.com>wrote:

> On 11/10/2011 11:38 AM, Paul Berry wrote:
> > These tests verify that the following built-in shader input variables
> > are read-only:
> >
> > For vertex shaders:
> > - gl_Color
> > - gl_SecondaryColor
> > - gl_Normal
> > - gl_Vertex
> > - gl_MultiTexCoord0
> > - gl_MultiTexCoord1
> > - gl_MultiTexCoord2
> > - gl_MultiTexCoord3
> > - gl_MultiTexCoord4
> > - gl_MultiTexCoord5
> > - gl_MultiTexCoord6
> > - gl_MultiTexCoord7
> > - gl_FogCoord
> > - gl_VertexID (a GLSL 1.30 feature)
> >
> > For fragment shaders:
> > - gl_FragCoord
> > - gl_FrontFacing
> > - gl_ClipDistance (a GLSL 1.30 feature)
> > ---
> >  .../storage-qualfiers/static-write-color.vert      |   22
> ++++++++++++++++++++
> >  .../storage-qualfiers/static-write-fog-coord.vert  |   22
> ++++++++++++++++++++
> >  .../storage-qualfiers/static-write-frag-coord.frag |   14 ++++++++++++
> >  .../static-write-front-facing.frag                 |   14 ++++++++++++
> >  .../static-write-multitexcoord0.vert               |   22
> ++++++++++++++++++++
> >  .../static-write-multitexcoord1.vert               |   22
> ++++++++++++++++++++
> >  .../static-write-multitexcoord2.vert               |   22
> ++++++++++++++++++++
> >  .../static-write-multitexcoord3.vert               |   22
> ++++++++++++++++++++
> >  .../static-write-multitexcoord4.vert               |   22
> ++++++++++++++++++++
> >  .../static-write-multitexcoord5.vert               |   22
> ++++++++++++++++++++
> >  .../static-write-multitexcoord6.vert               |   22
> ++++++++++++++++++++
> >  .../static-write-multitexcoord7.vert               |   22
> ++++++++++++++++++++
> >  .../storage-qualfiers/static-write-normal.vert     |   22
> ++++++++++++++++++++
> >  .../static-write-secondary-color.vert              |   22
> ++++++++++++++++++++
> >  .../storage-qualfiers/static-write-vertex.vert     |   22
> ++++++++++++++++++++
> >  .../static-write-clip-distance.frag                |   20
> ++++++++++++++++++
> >  .../storage-qualifiers/static-write-in-direct.vert |   18
> ++++++++++++++++
> >  .../static-write-in-indirect.vert                  |   21
> +++++++++++++++++++
> >  .../storage-qualifiers/static-write-vertex-id.vert |   20
> ++++++++++++++++++
>
> All the tests look good, but I have two comments.
>
> Along with gl_Color and gl_SecondaryColor, we should test gl_BackColor and
> gl_BackSecondaryColor too.
>

You're probably thinking of vertex shader outputs.  I'm testing vertex
shader inputs, and for vertex shader inputs only gl_Color and
gl_SecondaryColor exist.  (I know, weird, huh?)

However, your comment reminds me that I left out some fragment shader
inputs: gl_Color, gl_SecondaryColor, gl_TexCoord, gl_FogFragCoord, and
gl_PointCoord.  I'll add those.


>
> Tests static-write-in-indirect and static-write-in-direct fall outside of
> the commit's subject. The commit
> message should be updated to mention them or they should be placed in a
> separate patch.
>

You're right of course.  That will teach me to write code during a meeting.

I'll send out a pair of patches to take the place of this one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20111111/0777a1c8/attachment.html>


More information about the Piglit mailing list