--- .../default-precision-sampler.frag | 28 +++++++++++++++ .../default-precision-sampler.vert | 29 +++++++++++++++ .../compiler/default-precision-sampler.frag | 41 +++++++++++++++++++++ .../compiler/default-precision-sampler.vert | 42 ++++++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.frag create mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.vert create mode 100644 tests/spec/glsl-es-3.00/compiler/default-precision-sampler.frag create mode 100644 tests/spec/glsl-es-3.00/compiler/default-precision-sampler.vert
diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.frag new file mode 100644 index 0000000..f600796 --- /dev/null +++ b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.frag @@ -0,0 +1,28 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// check_link: true +// [end config] +// +// From the GLSL ES 1.00 specification, section 4.5.3 ("Default +// Precision Qualifiers"): +// +// "The precision statement +// +// precision precision-qualifier type; +// +// can be used to establish a default precision qualifier. The +// type field can be int or float or any of the sampler types, and +// the precision-qualifier can be lowp, mediump, or highp." +// +// This test verifies that a default precision qualifier can be used +// on all of GLSL ES 1.00's sampler types. + +#version 100 + +precision mediump sampler2D; +precision mediump samplerCube; + +void main() +{ +} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.vert b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.vert new file mode 100644 index 0000000..b44d016 --- /dev/null +++ b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.vert @@ -0,0 +1,29 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// check_link: true +// [end config] +// +// From the GLSL ES 1.00 specification, section 4.5.3 ("Default +// Precision Qualifiers"): +// +// "The precision statement +// +// precision precision-qualifier type; +// +// can be used to establish a default precision qualifier. The +// type field can be int or float or any of the sampler types, and +// the precision-qualifier can be lowp, mediump, or highp." +// +// This test verifies that a default precision qualifier can be used +// on all of GLSL ES 1.00's sampler types. + +#version 100 + +precision mediump sampler2D; +precision mediump samplerCube; + +void main() +{ + gl_Position = vec4(0.0); +} diff --git a/tests/spec/glsl-es-3.00/compiler/default-precision-sampler.frag b/tests/spec/glsl-es-3.00/compiler/default-precision-sampler.frag new file mode 100644 index 0000000..4731491 --- /dev/null +++ b/tests/spec/glsl-es-3.00/compiler/default-precision-sampler.frag @@ -0,0 +1,41 @@ +// [config] +// expect_result: pass +// glsl_version: 3.00 es +// check_link: true +// [end config] +// +// From the GLSL ES 3.00 specification, section 4.5.4 ("Default +// Precision Qualifiers"): +// +// "The precision statement +// +// precision precision-qualifier type; +// +// can be used to establish a default precision qualifier. The +// type field can be int or float or any of the sampler types, and +// the precision-qualifier can be lowp, mediump, or highp." +// +// This test verifies that a default precision qualifier can be used +// on all of GLSL ES 3.00's sampler types. + +#version 300 es + +precision mediump sampler2D; +precision mediump sampler3D; +precision mediump samplerCube; +precision mediump samplerCubeShadow; +precision mediump sampler2DShadow; +precision mediump sampler2DArray; +precision mediump sampler2DArrayShadow; +precision mediump isampler2D; +precision mediump isampler3D; +precision mediump isamplerCube; +precision mediump isampler2DArray; +precision mediump usampler2D; +precision mediump usampler3D; +precision mediump usamplerCube; +precision mediump usampler2DArray; + +void main() +{ +} diff --git a/tests/spec/glsl-es-3.00/compiler/default-precision-sampler.vert b/tests/spec/glsl-es-3.00/compiler/default-precision-sampler.vert new file mode 100644 index 0000000..7b10053 --- /dev/null +++ b/tests/spec/glsl-es-3.00/compiler/default-precision-sampler.vert @@ -0,0 +1,42 @@ +// [config] +// expect_result: pass +// glsl_version: 3.00 es +// check_link: true +// [end config] +// +// From the GLSL ES 3.00 specification, section 4.5.4 ("Default +// Precision Qualifiers"): +// +// "The precision statement +// +// precision precision-qualifier type; +// +// can be used to establish a default precision qualifier. The +// type field can be int or float or any of the sampler types, and +// the precision-qualifier can be lowp, mediump, or highp." +// +// This test verifies that a default precision qualifier can be used +// on all of GLSL ES 3.00's sampler types. + +#version 300 es + +precision mediump sampler2D; +precision mediump sampler3D; +precision mediump samplerCube; +precision mediump samplerCubeShadow; +precision mediump sampler2DShadow; +precision mediump sampler2DArray; +precision mediump sampler2DArrayShadow; +precision mediump isampler2D; +precision mediump isampler3D; +precision mediump isamplerCube; +precision mediump isampler2DArray; +precision mediump usampler2D; +precision mediump usampler3D; +precision mediump usamplerCube; +precision mediump usampler2DArray; + +void main() +{ + gl_Position = vec4(0.0); +} -- 1.8.1.3 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit