diff options
author | Chris Forbes <chrisf@ijw.co.nz> | 2013-09-26 19:03:09 +1200 |
---|---|---|
committer | Chris Forbes <chrisf@ijw.co.nz> | 2013-10-05 19:05:46 +1300 |
commit | 79c02a3afa8bc93a4292aebf963088d7320fda2d (patch) | |
tree | e8655b2ca3c07361cc9f5495cef97837500584fd | |
parent | b159024c2f0a9f4de08c0cd92099eb94d5bb6c3a (diff) |
arb_texture_query_levels: add compiler tests for textureQueryLevels()
This tests that all the required signatures exist.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
6 files changed, 220 insertions, 0 deletions
diff --git a/tests/spec/arb_texture_query_levels/compiler/builtin-functions-float-samplers.frag b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-float-samplers.frag new file mode 100644 index 000000000..d6a19ba00 --- /dev/null +++ b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-float-samplers.frag @@ -0,0 +1,46 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_texture_query_levels GL_ARB_texture_cube_map_array +// [end config] + +#version 130 +#extension GL_ARB_texture_query_levels: require +#extension GL_ARB_texture_cube_map_array: require + +uniform sampler1D s1D; +uniform sampler2D s2D; +uniform sampler3D s3D; +uniform samplerCube sCube; +uniform sampler1DArray s1DArray; +uniform sampler2DArray s2DArray; +uniform samplerCubeArray sCubeArray; + +uniform sampler1DShadow s1DShadow; +uniform sampler2DShadow s2DShadow; +uniform samplerCubeShadow sCubeShadow; +uniform sampler1DArrayShadow s1DArrayShadow; +uniform sampler2DArrayShadow s2DArrayShadow; +uniform samplerCubeArrayShadow sCubeArrayShadow; + +void main() +{ + int result = 0; + + result += textureQueryLevels(s1D); + result += textureQueryLevels(s2D); + result += textureQueryLevels(s3D); + result += textureQueryLevels(sCube); + result += textureQueryLevels(s1DArray); + result += textureQueryLevels(s2DArray); + result += textureQueryLevels(sCubeArray); + + result += textureQueryLevels(s1DShadow); + result += textureQueryLevels(s2DShadow); + result += textureQueryLevels(sCubeShadow); + result += textureQueryLevels(s1DArrayShadow); + result += textureQueryLevels(s2DArrayShadow); + result += textureQueryLevels(sCubeArrayShadow); + + gl_FragColor = vec4(result); +} diff --git a/tests/spec/arb_texture_query_levels/compiler/builtin-functions-float-samplers.vert b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-float-samplers.vert new file mode 100644 index 000000000..2e66e9424 --- /dev/null +++ b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-float-samplers.vert @@ -0,0 +1,46 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_texture_query_levels GL_ARB_texture_cube_map_array +// [end config] + +#version 130 +#extension GL_ARB_texture_query_levels: require +#extension GL_ARB_texture_cube_map_array: require + +uniform sampler1D s1D; +uniform sampler2D s2D; +uniform sampler3D s3D; +uniform samplerCube sCube; +uniform sampler1DArray s1DArray; +uniform sampler2DArray s2DArray; +uniform samplerCubeArray sCubeArray; + +uniform sampler1DShadow s1DShadow; +uniform sampler2DShadow s2DShadow; +uniform samplerCubeShadow sCubeShadow; +uniform sampler1DArrayShadow s1DArrayShadow; +uniform sampler2DArrayShadow s2DArrayShadow; +uniform samplerCubeArrayShadow sCubeArrayShadow; + +void main() +{ + int result = 0; + + result += textureQueryLevels(s1D); + result += textureQueryLevels(s2D); + result += textureQueryLevels(s3D); + result += textureQueryLevels(sCube); + result += textureQueryLevels(s1DArray); + result += textureQueryLevels(s2DArray); + result += textureQueryLevels(sCubeArray); + + result += textureQueryLevels(s1DShadow); + result += textureQueryLevels(s2DShadow); + result += textureQueryLevels(sCubeShadow); + result += textureQueryLevels(s1DArrayShadow); + result += textureQueryLevels(s2DArrayShadow); + result += textureQueryLevels(sCubeArrayShadow); + + gl_Position = vec4(result); +} diff --git a/tests/spec/arb_texture_query_levels/compiler/builtin-functions-int-samplers.frag b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-int-samplers.frag new file mode 100644 index 000000000..56c29e4c2 --- /dev/null +++ b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-int-samplers.frag @@ -0,0 +1,32 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_texture_query_levels GL_ARB_texture_cube_map_array +// [end config] + +#version 130 +#extension GL_ARB_texture_query_levels: require +#extension GL_ARB_texture_cube_map_array: require + +uniform isampler1D s1D; +uniform isampler2D s2D; +uniform isampler3D s3D; +uniform isamplerCube sCube; +uniform isampler1DArray s1DArray; +uniform isampler2DArray s2DArray; +uniform isamplerCubeArray sCubeArray; + +void main() +{ + int result = 0; + + result += textureQueryLevels(s1D); + result += textureQueryLevels(s2D); + result += textureQueryLevels(s3D); + result += textureQueryLevels(sCube); + result += textureQueryLevels(s1DArray); + result += textureQueryLevels(s2DArray); + result += textureQueryLevels(sCubeArray); + + gl_FragColor = vec4(result); +} diff --git a/tests/spec/arb_texture_query_levels/compiler/builtin-functions-int-samplers.vert b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-int-samplers.vert new file mode 100644 index 000000000..4255ffbbb --- /dev/null +++ b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-int-samplers.vert @@ -0,0 +1,32 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_texture_query_levels GL_ARB_texture_cube_map_array +// [end config] + +#version 130 +#extension GL_ARB_texture_query_levels: require +#extension GL_ARB_texture_cube_map_array: require + +uniform isampler1D s1D; +uniform isampler2D s2D; +uniform isampler3D s3D; +uniform isamplerCube sCube; +uniform isampler1DArray s1DArray; +uniform isampler2DArray s2DArray; +uniform isamplerCubeArray sCubeArray; + +void main() +{ + int result = 0; + + result += textureQueryLevels(s1D); + result += textureQueryLevels(s2D); + result += textureQueryLevels(s3D); + result += textureQueryLevels(sCube); + result += textureQueryLevels(s1DArray); + result += textureQueryLevels(s2DArray); + result += textureQueryLevels(sCubeArray); + + gl_Position = vec4(result); +} diff --git a/tests/spec/arb_texture_query_levels/compiler/builtin-functions-uint-samplers.frag b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-uint-samplers.frag new file mode 100644 index 000000000..3ad463452 --- /dev/null +++ b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-uint-samplers.frag @@ -0,0 +1,32 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_texture_query_levels GL_ARB_texture_cube_map_array +// [end config] + +#version 130 +#extension GL_ARB_texture_query_levels: require +#extension GL_ARB_texture_cube_map_array: require + +uniform usampler1D s1D; +uniform usampler2D s2D; +uniform usampler3D s3D; +uniform usamplerCube sCube; +uniform usampler1DArray s1DArray; +uniform usampler2DArray s2DArray; +uniform usamplerCubeArray sCubeArray; + +void main() +{ + int result = 0; + + result += textureQueryLevels(s1D); + result += textureQueryLevels(s2D); + result += textureQueryLevels(s3D); + result += textureQueryLevels(sCube); + result += textureQueryLevels(s1DArray); + result += textureQueryLevels(s2DArray); + result += textureQueryLevels(sCubeArray); + + gl_FragColor = vec4(result); +} diff --git a/tests/spec/arb_texture_query_levels/compiler/builtin-functions-uint-samplers.vert b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-uint-samplers.vert new file mode 100644 index 000000000..9a8293637 --- /dev/null +++ b/tests/spec/arb_texture_query_levels/compiler/builtin-functions-uint-samplers.vert @@ -0,0 +1,32 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_texture_query_levels GL_ARB_texture_cube_map_array +// [end config] + +#version 130 +#extension GL_ARB_texture_query_levels: require +#extension GL_ARB_texture_cube_map_array: require + +uniform usampler1D s1D; +uniform usampler2D s2D; +uniform usampler3D s3D; +uniform usamplerCube sCube; +uniform usampler1DArray s1DArray; +uniform usampler2DArray s2DArray; +uniform usamplerCubeArray sCubeArray; + +void main() +{ + int result = 0; + + result += textureQueryLevels(s1D); + result += textureQueryLevels(s2D); + result += textureQueryLevels(s3D); + result += textureQueryLevels(sCube); + result += textureQueryLevels(s1DArray); + result += textureQueryLevels(s2DArray); + result += textureQueryLevels(sCubeArray); + + gl_Position = vec4(result); +} |