On 25 October 2013 16:49, Anuj Phogat <[email protected]> wrote: > Tests gl_SamplePosition, > gl_SampleID, > gl_NumSamples, > gl_SampleMask[] > > Signed-off-by: Anuj Phogat <[email protected]> >
Personally, I don't think these tests are necessary. The previous patches adequately exercise compilation of these new built-ins. I don't feel terribly strongly, though. If you want to keep them, you can consider this patch: Reviewed-by: Paul Berry <[email protected]> > --- > tests/all.tests | 4 ++++ > tests/spec/arb_sample_shading/compiler/gl_NumSamples.frag | 12 > ++++++++++++ > tests/spec/arb_sample_shading/compiler/gl_SampleID.frag | 12 > ++++++++++++ > tests/spec/arb_sample_shading/compiler/gl_SampleMask.frag | 13 > +++++++++++++ > .../spec/arb_sample_shading/compiler/gl_SamplePosition.frag | 12 > ++++++++++++ > 5 files changed, 53 insertions(+) > create mode 100644 > tests/spec/arb_sample_shading/compiler/gl_NumSamples.frag > create mode 100644 tests/spec/arb_sample_shading/compiler/gl_SampleID.frag > create mode 100644 > tests/spec/arb_sample_shading/compiler/gl_SampleMask.frag > create mode 100644 > tests/spec/arb_sample_shading/compiler/gl_SamplePosition.frag > > diff --git a/tests/all.tests b/tests/all.tests > index 9df5a94..717d41f 100644 > --- a/tests/all.tests > +++ b/tests/all.tests > @@ -1357,6 +1357,10 @@ for num_samples in TEST_SAMPLE_COUNTS: > executable = 'arb_sample_shading-{0} -auto'.format(test_name) > arb_sample_shading[test_name] = PlainExecTest(executable) > > +import_glsl_parser_tests(spec['ARB_sample_shading'], > + os.path.join(testsDir, 'spec', > 'arb_sample_shading'), > + ['compiler']) > + > # Group ARB_debug_output > arb_debug_output = Group() > spec['ARB_debug_output'] = arb_debug_output > diff --git a/tests/spec/arb_sample_shading/compiler/gl_NumSamples.frag > b/tests/spec/arb_sample_shading/compiler/gl_NumSamples.frag > new file mode 100644 > index 0000000..d99e8b8 > --- /dev/null > +++ b/tests/spec/arb_sample_shading/compiler/gl_NumSamples.frag > @@ -0,0 +1,12 @@ > +// [config] > +// expect_result: pass > +// glsl_version: 1.30 > +// require_extensions: GL_ARB_sample_shading > +// [end config] > +#version 130 > +#extension GL_ARB_sample_shading : enable > + > +int func() > +{ > + return gl_NumSamples; > +} > diff --git a/tests/spec/arb_sample_shading/compiler/gl_SampleID.frag > b/tests/spec/arb_sample_shading/compiler/gl_SampleID.frag > new file mode 100644 > index 0000000..0d202be > --- /dev/null > +++ b/tests/spec/arb_sample_shading/compiler/gl_SampleID.frag > @@ -0,0 +1,12 @@ > +// [config] > +// expect_result: pass > +// glsl_version: 1.30 > +// require_extensions: GL_ARB_sample_shading > +// [end config] > +#version 130 > +#extension GL_ARB_sample_shading : enable > + > +int func() > +{ > + return gl_SampleID; > +} > diff --git a/tests/spec/arb_sample_shading/compiler/gl_SampleMask.frag > b/tests/spec/arb_sample_shading/compiler/gl_SampleMask.frag > new file mode 100644 > index 0000000..1e659bc > --- /dev/null > +++ b/tests/spec/arb_sample_shading/compiler/gl_SampleMask.frag > @@ -0,0 +1,13 @@ > +// [config] > +// expect_result: pass > +// glsl_version: 1.30 > +// require_extensions: GL_ARB_sample_shading > +// [end config] > +#version 130 > +#extension GL_ARB_sample_shading : enable > + > +int func() > +{ > + gl_SampleMask[0] = 0xff; > + return 0; > +} > diff --git a/tests/spec/arb_sample_shading/compiler/gl_SamplePosition.frag > b/tests/spec/arb_sample_shading/compiler/gl_SamplePosition.frag > new file mode 100644 > index 0000000..be42d90 > --- /dev/null > +++ b/tests/spec/arb_sample_shading/compiler/gl_SamplePosition.frag > @@ -0,0 +1,12 @@ > +// [config] > +// expect_result: pass > +// glsl_version: 1.30 > +// require_extensions: GL_ARB_sample_shading > +// [end config] > +#version 130 > +#extension GL_ARB_sample_shading : enable > + > +vec2 func() > +{ > + return gl_SamplePosition; > +} > -- > 1.8.1.4 > > _______________________________________________ > Piglit mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/piglit >
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
