[Piglit] [PATCH 1/2] Replace [vertex/fragment shader file] sections in shader_test files.

Ian Romanick idr at freedesktop.org
Mon Aug 4 20:49:29 PDT 2014


On 07/14/2014 08:52 AM, Kenneth Graunke wrote:
> This replaces sections like:
> 
> [fragment shader file]
> glsl-color.frag
> 
> with [fragment shader] and the contents of that file.
> 
> The majority of shader_test files include all their shaders in a single
> file, which is nice: you can read and understand them all at a glance,
> without having to open multiple files.  You also don't need to worry
> about extra data files that live in some path.
> 
> In roughly 60% of these cases, the shader file being included was a
> a single line (such as gl_FragColor = gl_Color), so just importing it
> into the shader_test doesn't even add much extra data.  The other 40%
> were shadow tests where it added a bit more, but it's still not
> horrible.

That's weird...  I thought I alread did this when I added [vertex shader
passthrough] some months ago.

/me looks at the tests...

Right... glsl-mvp.vert uses gl_ModelViewProjectMatrix, but passthrough
does not it.  It looks like a bunch of those tests could use passthrough
but don't.  If you're super bored... ;)

Either way, the series is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> This commit was autogenerated by a python script, with extra 'git rm's
> for the unnecessary .vert/.frag files after the conversion.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> 
> I've trimmed down the patch for the mailing list because it was 148K.
> You can get the entire patch in the 'shaderrunnerclean' branch of
> ~kwg/piglit.
> 
> You can also generate the patch by running:
> $ find tests -name '*.shader_test' -exec ./rip-out-shader-files.py {} \;
> 
> where rip-out-shader-files.py is:
> 
> #! /usr/bin/python3
> import sys
> import os.path as path
> 
> dirname = path.dirname(sys.argv[1])
> 
> with open(sys.argv[1]) as f:
>     line_is_filename = False
>     output = ""
>     for line in f.readlines():
>         if line_is_filename:
>             line_is_filename = False
>             with open(path.join(dirname, line.strip())) as shader:
>                 output += shader.read().strip()
>             output += '\n'
>             continue
>             
>         if line == '[vertex shader file]\n':
>             output += '[vertex shader]\n'
>             line_is_filename = True
>         elif line == '[fragment shader file]\n':
>             output += '[fragment shader]\n'
>             line_is_filename = True
>         else:
>             output += line
> 
> with open(sys.argv[1], 'w') as f:
>     f.write(output)
> 
> 
>  .../arb_texture_gather-miplevels.shader_test       |  7 ++-
>  tests/shaders/glsl-array-bounds-01.shader_test     |  7 ++-
>  tests/shaders/glsl-array-bounds-02.shader_test     |  7 ++-
>  tests/shaders/glsl-array-bounds-03.shader_test     |  7 ++-
>  tests/shaders/glsl-array-bounds-04.shader_test     |  7 ++-
>  tests/shaders/glsl-array-bounds-05.shader_test     |  7 ++-
>  tests/shaders/glsl-array-bounds-06.shader_test     |  7 ++-
>  tests/shaders/glsl-array-bounds-07.shader_test     |  7 ++-
>  tests/shaders/glsl-array-bounds-08.shader_test     |  7 ++-
>  tests/shaders/glsl-array-length.shader_test        |  7 ++-
>  .../shaders/glsl-array-uniform-length.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-abs.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-acos.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-all.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-any.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-asin.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-atan.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-ceil.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-clamp.shader_test |  7 ++-
>  tests/shaders/glsl-const-builtin-cos.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-cosh.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-cross.shader_test |  7 ++-
>  .../shaders/glsl-const-builtin-degrees.shader_test |  7 ++-
>  .../glsl-const-builtin-derivatives.shader_test     |  7 ++-
>  .../glsl-const-builtin-distance.shader_test        |  7 ++-
>  tests/shaders/glsl-const-builtin-dot.shader_test   |  7 ++-
>  .../glsl-const-builtin-equal-bool.shader_test      |  7 ++-
>  tests/shaders/glsl-const-builtin-equal.shader_test |  7 ++-
>  tests/shaders/glsl-const-builtin-exp.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-exp2.shader_test  |  7 ++-
>  .../glsl-const-builtin-faceforward.shader_test     |  7 ++-
>  tests/shaders/glsl-const-builtin-floor.shader_test |  7 ++-
>  tests/shaders/glsl-const-builtin-fract.shader_test |  7 ++-
>  .../glsl-const-builtin-greaterThan.shader_test     |  7 ++-
>  ...glsl-const-builtin-greaterThanEqual.shader_test |  7 ++-
>  .../glsl-const-builtin-inversesqrt.shader_test     |  7 ++-
>  .../shaders/glsl-const-builtin-length.shader_test  |  7 ++-
>  .../glsl-const-builtin-lessThan.shader_test        |  7 ++-
>  .../glsl-const-builtin-lessThanEqual.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-log.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-log2.shader_test  |  7 ++-
>  .../glsl-const-builtin-matrixCompMult.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-max.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-min.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-mix.shader_test   |  7 ++-
>  tests/shaders/glsl-const-builtin-mod.shader_test   |  7 ++-
>  .../glsl-const-builtin-normalize.shader_test       |  7 ++-
>  tests/shaders/glsl-const-builtin-not.shader_test   |  7 ++-
>  .../glsl-const-builtin-notEqual-bool.shader_test   |  7 ++-
>  .../glsl-const-builtin-notEqual.shader_test        |  7 ++-
>  .../glsl-const-builtin-outerProduct.shader_test    |  7 ++-
>  tests/shaders/glsl-const-builtin-pow.shader_test   |  7 ++-
>  .../shaders/glsl-const-builtin-radians.shader_test |  7 ++-
>  .../shaders/glsl-const-builtin-reflect.shader_test |  7 ++-
>  .../shaders/glsl-const-builtin-refract.shader_test |  7 ++-
>  tests/shaders/glsl-const-builtin-sign.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-sin.shader_test   |  7 ++-
>  .../glsl-const-builtin-smoothstep.shader_test      |  7 ++-
>  tests/shaders/glsl-const-builtin-sqrt.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-step.shader_test  |  7 ++-
>  tests/shaders/glsl-const-builtin-tan.shader_test   |  7 ++-
>  .../glsl-const-builtin-transpose.shader_test       |  7 ++-
>  tests/shaders/glsl-const-folding-01.shader_test    |  7 ++-
>  .../glsl-fs-array-redeclaration.shader_test        |  7 ++-
>  tests/shaders/glsl-fs-ceil.shader_test             |  7 ++-
>  tests/shaders/glsl-fs-discard-01.shader_test       |  7 ++-
>  tests/shaders/glsl-fs-floor.shader_test            |  7 ++-
>  tests/shaders/glsl-fs-if-greater-equal.shader_test |  7 ++-
>  tests/shaders/glsl-fs-if-greater.shader_test       |  7 ++-
>  tests/shaders/glsl-fs-if-less-equal.shader_test    |  7 ++-
>  tests/shaders/glsl-fs-if-less.shader_test          |  7 ++-
>  tests/shaders/glsl-fs-loop-300.shader_test         |  7 ++-
>  tests/shaders/glsl-fs-loop-const-decr.shader_test  |  7 ++-
>  tests/shaders/glsl-fs-loop-const-incr.shader_test  |  7 ++-
>  tests/shaders/glsl-fs-loop-ge.shader_test          |  7 ++-
>  tests/shaders/glsl-fs-loop-gt.shader_test          |  7 ++-
>  tests/shaders/glsl-fs-loop-le.shader_test          |  7 ++-
>  tests/shaders/glsl-fs-loop-lt.shader_test          |  7 ++-
>  .../glsl-fs-loop-redundant-condition.shader_test   |  7 ++-
>  .../glsl-fs-loop-two-counter-01.shader_test        |  7 ++-
>  .../glsl-fs-loop-two-counter-02.shader_test        |  7 ++-
>  .../glsl-fs-loop-two-counter-03.shader_test        |  7 ++-
>  .../glsl-fs-loop-two-counter-04.shader_test        |  7 ++-
>  tests/shaders/glsl-fs-loop-zero-iter.shader_test   |  7 ++-
>  tests/shaders/glsl-fs-mod.shader_test              |  7 ++-
>  tests/shaders/glsl-fs-neg.shader_test              |  7 ++-
>  tests/shaders/glsl-fs-sign.shader_test             |  7 ++-
>  tests/shaders/glsl-fs-step.shader_test             |  7 ++-
>  tests/shaders/glsl-fs-unroll-out-param.shader_test |  7 ++-
>  .../shaders/glsl-fs-unroll-side-effect.shader_test |  7 ++-
>  .../glsl-implicit-conversion-01.shader_test        |  7 ++-
>  tests/shaders/glsl-inexact-overloads.shader_test   |  7 ++-
>  .../shaders/glsl-mat-from-int-ctor-01.shader_test  |  7 ++-
>  .../shaders/glsl-mat-from-int-ctor-02.shader_test  |  7 ++-
>  .../shaders/glsl-mat-from-int-ctor-03.shader_test  |  7 ++-
>  .../shaders/glsl-mat-from-vec-ctor-01.shader_test  |  7 ++-
>  tests/shaders/glsl-override-builtin-2.shader_test  |  7 ++-
>  tests/shaders/glsl-override-builtin.shader_test    |  7 ++-
>  .../glsl-pp-elif-no-expression-1.shader_test       |  7 ++-
>  tests/shaders/glsl-vs-constructor-call.shader_test |  7 ++-
>  tests/shaders/glsl-vs-if-greater-equal.shader_test |  7 ++-
>  tests/shaders/glsl-vs-if-greater.shader_test       |  7 ++-
>  tests/shaders/glsl-vs-if-less-equal.shader_test    |  7 ++-
>  tests/shaders/glsl-vs-if-less.shader_test          |  7 ++-
>  tests/shaders/glsl-vs-if-nested.shader_test        |  7 ++-
>  .../glsl-vs-large-uniform-array.shader_test        |  7 ++-
>  .../glsl-vs-swizzle-swizzle-lhs.shader_test        |  7 ++-
>  .../glsl-vs-swizzle-swizzle-rhs.shader_test        |  7 ++-
>  tests/shaders/glsl-vs-vec4-indexing-1.shader_test  |  7 ++-
>  tests/shaders/glsl-vs-vec4-indexing-2.shader_test  |  7 ++-
>  tests/shaders/glsl-vs-vec4-indexing-3.shader_test  |  7 ++-
>  tests/shaders/glsl-vs-vec4-indexing-4.shader_test  |  7 ++-
>  tests/shaders/glsl-vs-vec4-indexing-5.shader_test  |  7 ++-
>  tests/shaders/glsl-vs-vec4-indexing-6.shader_test  |  7 ++-
>  ...l-vs-vec4-indexing-temp-dst-in-loop.shader_test |  7 ++-
>  ...ng-temp-dst-in-nested-loop-combined.shader_test |  7 ++-
>  .../glsl-vs-vec4-indexing-temp-dst.shader_test     |  7 ++-
>  ...l-vs-vec4-indexing-temp-src-in-loop.shader_test |  7 ++-
>  ...ng-temp-src-in-nested-loop-combined.shader_test |  7 ++-
>  ...exing-temp-src-in-nested-loop-inner.shader_test |  7 ++-
>  ...exing-temp-src-in-nested-loop-outer.shader_test |  7 ++-
>  .../glsl-vs-vec4-indexing-temp-src.shader_test     |  7 ++-
>  tests/shaders/loopfunc.shader_test                 | 62 +++++++++++-----------
>  .../glsl-fs-shadow2DGradARB-01.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-02.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-03.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-04.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-05.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-06.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-07.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-08.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-09.shader_test         | 23 ++++++--
>  .../glsl-fs-shadow2DGradARB-cumulative.shader_test | 25 +++++++--
>  .../execution/glsl-fs-shadow2DGradARB.frag         | 10 ----
>  .../execution/glsl-fs-shadow2DGradARB.vert         |  7 ---
>  .../spec/arb_texture_rectangle/glsl-fs-shadow.vert |  8 ---
>  .../glsl-fs-shadow2DRect-01.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect-02.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect-03.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect-04.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect-05.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect-06.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect-07.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect-08.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect-09.shader_test            | 22 ++++++--
>  .../glsl-fs-shadow2DRect.frag                      |  8 ---
>  .../glsl-fs-shadow2DRect.shader_test               | 11 +++-
>  .../execution/fs-shadow2d-red-01.shader_test       | 22 ++++++--
>  .../execution/fs-shadow2d-red-02.shader_test       | 22 ++++++--
>  .../execution/fs-shadow2d-red-03.shader_test       | 22 ++++++--
>  .../spec/arb_texture_rg/execution/fs-shadow2d.frag |  8 ---
>  .../spec/arb_texture_rg/execution/fs-shadow2d.vert |  8 ---
>  tests/spec/ext_texture_array/glsl-fs-shadow.vert   |  8 ---
>  .../glsl-fs-shadow1DArray-01.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-02.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-03.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-04.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-05.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-06.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-07.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-08.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-09.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow1DArray-bias.shader_test         | 11 +++-
>  .../ext_texture_array/glsl-fs-shadow1DArray.frag   |  9 ----
>  .../glsl-fs-shadow1DArray.shader_test              | 11 +++-
>  .../glsl-fs-shadow2DArray-01.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow2DArray-02.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow2DArray-03.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow2DArray-04.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow2DArray-05.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow2DArray-06.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow2DArray-07.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow2DArray-08.shader_test           | 23 ++++++--
>  .../glsl-fs-shadow2DArray-09.shader_test           | 23 ++++++--
>  .../ext_texture_array/glsl-fs-shadow2DArray.frag   |  9 ----
>  .../glsl-fs-shadow2DArray.shader_test              | 11 +++-
>  .../execution/samplers/glsl-fs-shadow.vert         |  8 ---
>  .../samplers/glsl-fs-shadow1D-01.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-02.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-03.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-04.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-05.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-06.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-07.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-08.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-09.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow1D-bias.shader_test     | 11 +++-
>  .../execution/samplers/glsl-fs-shadow1D.frag       |  8 ---
>  .../samplers/glsl-fs-shadow1D.shader_test          | 11 +++-
>  .../samplers/glsl-fs-shadow2D-01.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-02.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-03.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-04.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-05.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-06.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-07.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-08.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-09.shader_test       | 22 ++++++--
>  .../samplers/glsl-fs-shadow2D-bias.shader_test     | 11 +++-
>  .../samplers/glsl-fs-shadow2D-clamp-z.shader_test  | 11 +++-
>  .../execution/samplers/glsl-fs-shadow2D.frag       |  8 ---
>  .../samplers/glsl-fs-shadow2D.shader_test          | 11 +++-
>  .../fs-texture-sampler2dshadow-01.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-02.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-03.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-04.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-05.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-06.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-07.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-08.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-09.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-10.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-11.shader_test      | 20 +++++--
>  .../fs-texture-sampler2dshadow-12.shader_test      | 20 +++++--
>  .../execution/fs-texture-sampler2dshadow.frag      |  8 ---
>  .../execution/fs-texture-sampler2dshadow.vert      |  6 ---
>  216 files changed, 1987 insertions(+), 687 deletions(-)
>  delete mode 100644 tests/spec/arb_shader_texture_lod/execution/glsl-fs-shadow2DGradARB.frag
>  delete mode 100644 tests/spec/arb_shader_texture_lod/execution/glsl-fs-shadow2DGradARB.vert
>  delete mode 100644 tests/spec/arb_texture_rectangle/glsl-fs-shadow.vert
>  delete mode 100644 tests/spec/arb_texture_rectangle/glsl-fs-shadow2DRect.frag
>  delete mode 100644 tests/spec/arb_texture_rg/execution/fs-shadow2d.frag
>  delete mode 100644 tests/spec/arb_texture_rg/execution/fs-shadow2d.vert
>  delete mode 100644 tests/spec/ext_texture_array/glsl-fs-shadow.vert
>  delete mode 100644 tests/spec/ext_texture_array/glsl-fs-shadow1DArray.frag
>  delete mode 100644 tests/spec/ext_texture_array/glsl-fs-shadow2DArray.frag
>  delete mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow.vert
>  delete mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow1D.frag
>  delete mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.frag
>  delete mode 100644 tests/spec/glsl-1.30/execution/fs-texture-sampler2dshadow.frag
>  delete mode 100644 tests/spec/glsl-1.30/execution/fs-texture-sampler2dshadow.vert
> 
> diff --git a/tests/shaders/arb_texture_gather-miplevels.shader_test b/tests/shaders/arb_texture_gather-miplevels.shader_test
> index 88d5f8d..6d52897 100644
> --- a/tests/shaders/arb_texture_gather-miplevels.shader_test
> +++ b/tests/shaders/arb_texture_gather-miplevels.shader_test
> @@ -2,8 +2,11 @@
>  GLSL >= 1.30
>  GL_ARB_texture_gather
>  
> -[vertex shader file]
> -glsl-mvp.vert
> +[vertex shader]
> +void main()
> +{
> +	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
> +}
>  
>  [fragment shader]
>  #extension GL_ARB_texture_gather: require
> diff --git a/tests/shaders/glsl-array-bounds-01.shader_test b/tests/shaders/glsl-array-bounds-01.shader_test
> index 82cf649..2e7c762 100644
> --- a/tests/shaders/glsl-array-bounds-01.shader_test
> +++ b/tests/shaders/glsl-array-bounds-01.shader_test
> @@ -1,8 +1,11 @@
>  [require]
>  GLSL >= 1.20
>  
> -[vertex shader file]
> -glsl-mvp.vert
> +[vertex shader]
> +void main()
> +{
> +	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
> +}
>  
>  [fragment shader]
>  /* Verify that out-of-bounds access to an array does not result in any sort of
> diff --git a/tests/shaders/glsl-array-bounds-02.shader_test b/tests/shaders/glsl-array-bounds-02.shader_test
> index f5f9035..f9c8202 100644
> --- a/tests/shaders/glsl-array-bounds-02.shader_test
> +++ b/tests/shaders/glsl-array-bounds-02.shader_test
> @@ -1,8 +1,11 @@
>  [require]
>  GLSL >= 1.20
>  
> -[vertex shader file]
> -glsl-mvp.vert
> +[vertex shader]
> +void main()
> +{
> +	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
> +}
>  
>  [fragment shader]
>  /* Verify that out-of-bounds access to an array does not result in any sort of
> diff --git a/tests/shaders/glsl-array-bounds-03.shader_test b/tests/shaders/glsl-array-bounds-03.shader_test
> index 210ea5c..1d79084 100644
> --- a/tests/shaders/glsl-array-bounds-03.shader_test
> +++ b/tests/shaders/glsl-array-bounds-03.shader_test
> @@ -23,8 +23,11 @@ void main()
>        gl_FrontColor = vec4(0.0, 1.0, 0.0, 1.0);
>  }
>  
> -[fragment shader file]
> -glsl-color.frag
> +[fragment shader]
> +void main()
> +{
> +	gl_FragColor = gl_Color;
> +}
>  
>  [test]
>  clear color 0.0 0.0 0.0 0.0
> diff --git a/tests/shaders/glsl-array-bounds-04.shader_test b/tests/shaders/glsl-array-bounds-04.shader_test
> index 2c09b76..8e21e7a 100644
> --- a/tests/shaders/glsl-array-bounds-04.shader_test
> +++ b/tests/shaders/glsl-array-bounds-04.shader_test
> @@ -22,8 +22,11 @@ void main()
>        gl_FrontColor = vec4(0.0, 1.0, 0.0, 1.0);
>  }
>  
> -[fragment shader file]
> -glsl-color.frag
> +[fragment shader]
> +void main()
> +{
> +	gl_FragColor = gl_Color;
> +}
>  
>  [test]
>  uniform int idx 20
> diff --git a/tests/shaders/glsl-array-bounds-05.shader_test b/tests/shaders/glsl-array-bounds-05.shader_test
> index 63db5c2..b2ec301 100644
> --- a/tests/shaders/glsl-array-bounds-05.shader_test
> +++ b/tests/shaders/glsl-array-bounds-05.shader_test
> @@ -1,8 +1,11 @@
>  [require]
>  GLSL >= 1.20
>  
> -[vertex shader file]
> -glsl-mvp.vert
> +[vertex shader]
> +void main()
> +{
> +	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
> +}
>  
>  [fragment shader]
>  /* Verify that out-of-bounds access to an array does not result in any sort of
> diff --git a/tests/shaders/glsl-array-bounds-06.shader_test b/tests/shaders/glsl-array-bounds-06.shader_test
> index 2b87f0b..c540ff1 100644
> --- a/tests/shaders/glsl-array-bounds-06.shader_test
> +++ b/tests/shaders/glsl-array-bounds-06.shader_test
> @@ -1,8 +1,11 @@
>  [require]
>  GLSL >= 1.20
>  
> -[vertex shader file]
> -glsl-mvp.vert
> +[vertex shader]
> +void main()
> +{
> +	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
> +}
>  
>  [fragment shader]
>  /* Verify that out-of-bounds access to an array does not result in any sort of
> diff --git a/tests/shaders/glsl-array-bounds-07.shader_test b/tests/shaders/glsl-array-bounds-07.shader_test
> index b42cbe2..7bc3a05 100644
> --- a/tests/shaders/glsl-array-bounds-07.shader_test
> +++ b/tests/shaders/glsl-array-bounds-07.shader_test
> @@ -23,8 +23,11 @@ void main()
>        gl_FrontColor = vec4(0.0, 1.0, 0.0, 1.0);
>  }
>  
> -[fragment shader file]
> -glsl-color.frag
> +[fragment shader]
> +void main()
> +{
> +	gl_FragColor = gl_Color;
> +}
>  
>  [test]
>  clear color 0.0 0.0 0.0 0.0
> diff --git a/tests/shaders/glsl-array-bounds-08.shader_test b/tests/shaders/glsl-array-bounds-08.shader_test
> index b3aaa01..5fddc10 100644
> --- a/tests/shaders/glsl-array-bounds-08.shader_test
> +++ b/tests/shaders/glsl-array-bounds-08.shader_test
> @@ -22,8 +22,11 @@ void main()
>        gl_FrontColor = vec4(0.0, 1.0, 0.0, 1.0);
>  }
>  
> -[fragment shader file]
> -glsl-color.frag
> +[fragment shader]
> +void main()
> +{
> +	gl_FragColor = gl_Color;
> +}
>  
>  [test]
>  uniform int idx -20
> diff --git a/tests/spec/arb_shader_texture_lod/execution/glsl-fs-shadow2DGradARB-01.shader_test b/tests/spec/arb_shader_texture_lod/execution/glsl-fs-shadow2DGradARB-01.shader_test
> index 9636f9e..b2289b3 100644
> --- a/tests/spec/arb_shader_texture_lod/execution/glsl-fs-shadow2DGradARB-01.shader_test
> +++ b/tests/spec/arb_shader_texture_lod/execution/glsl-fs-shadow2DGradARB-01.shader_test
> @@ -7,11 +7,26 @@
>  GLSL >= 1.10
>  GL_ARB_shader_texture_lod
>  
> -[vertex shader file]
> -glsl-fs-shadow2DGradARB.vert
> +[vertex shader]
> +varying vec4 texcoord;
>  
> -[fragment shader file]
> -glsl-fs-shadow2DGradARB.frag
> +void main()
> +{
> +	gl_Position = gl_Vertex;
> +	texcoord = (gl_Vertex + 1.0) / 2.0;
> +}
> +
> +[fragment shader]
> +#extension GL_ARB_shader_texture_lod : require
> +
> +uniform sampler2DShadow tex;
> +varying vec4 texcoord;
> +
> +void main()
> +{
> +	gl_FragColor = shadow2DGradARB(tex, texcoord.xyy,
> +				       dFdx(texcoord.xy), dFdy(texcoord.xy));
> +}
>  
>  [test]
>  uniform int tex 0
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
> 



More information about the Piglit mailing list