Message ID | 1361224963-8407-1-git-send-email-tom.gall@linaro.org |
---|---|
State | Accepted |
Headers | show |
Wouldn't a better subject for this patch be: glsl-es-1.00: add maximums/gl_MaxCombinedTextureImageUnits since it is not modifying shader_runner? -Jordan On Mon, Feb 18, 2013 at 2:02 PM, Tom Gall <tom.gall@linaro.org> wrote: > Adds tests/spec/glsl-es-1.00/maximums/ > gl_MaxCombinedTextureImageUnits.shader_test, checks built-in > constant gl_MaxCombinedTextureImageUnits > > Signed-off-by: Tom Gall <tom.gall@linaro.org> > --- > .../gl_MaxCombinedTextureImageUnits.shader_test | 30 ++++++++++++++++++++ > 1 file changed, 30 insertions(+) > create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test > > diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test > new file mode 100644 > index 0000000..bf3e5b8 > --- /dev/null > +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test > @@ -0,0 +1,30 @@ > +# [description] > +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. > +# > +# See the GLSL ES 1.0.17 specification, section 7.3, page 61 > + > +[require] > +GLSL ES >= 1.00 > +GL ES >= 2.0 > + > +[vertex shader] > +attribute vec4 vertex; > + > +void main(void) > +{ > + gl_Position = vertex; > +} > + > +[fragment shader] > + > +void main(void) > +{ > + if (gl_MaxCombinedTextureImageUnits >= 8) > + gl_FragColor = vec4(0, 1, 0, 0); > + else > + gl_FragColor = vec4(1, 0, 0, 0); > +} > + > +[test] > +draw rect -1 -1 2 2 > +probe all rgba 0.0 1.0 0.0 0.0 > -- > 1.7.10.4 > > _______________________________________________ > Piglit mailing list > Piglit@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/piglit
Hi Jordan, On Mon, Feb 18, 2013 at 8:01 PM, Jordan Justen <jljusten@gmail.com> wrote: > Wouldn't a better subject for this patch be: > glsl-es-1.00: add maximums/gl_MaxCombinedTextureImageUnits > > since it is not modifying shader_runner? These are datafiles for shader_runner, ergo why I used the shader_runner tag. I guess I could see it going either way. > -Jordan > > On Mon, Feb 18, 2013 at 2:02 PM, Tom Gall <tom.gall@linaro.org> wrote: >> Adds tests/spec/glsl-es-1.00/maximums/ >> gl_MaxCombinedTextureImageUnits.shader_test, checks built-in >> constant gl_MaxCombinedTextureImageUnits >> >> Signed-off-by: Tom Gall <tom.gall@linaro.org> <snip>
Tom Gall <tom.gall@linaro.org> writes: > Adds tests/spec/glsl-es-1.00/maximums/ > gl_MaxCombinedTextureImageUnits.shader_test, checks built-in > constant gl_MaxCombinedTextureImageUnits Previous commits to add tests of all the maximums have been a single commit. I'd recommend squashing all these and calling it "glsl-1.00/execution/maximums: Verify the limits in section 7.4". (it's 7.4 in my copy of the spec, not 7.3 as mentioned in the tests. And shader_runner is irrelevant to the commit.)
diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test new file mode 100644 index 0000000..bf3e5b8 --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test @@ -0,0 +1,30 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.3, page 61 + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] + +void main(void) +{ + if (gl_MaxCombinedTextureImageUnits >= 8) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0
Adds tests/spec/glsl-es-1.00/maximums/ gl_MaxCombinedTextureImageUnits.shader_test, checks built-in constant gl_MaxCombinedTextureImageUnits Signed-off-by: Tom Gall <tom.gall@linaro.org> --- .../gl_MaxCombinedTextureImageUnits.shader_test | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test