Re: [Piglit] [PATCH 4/5] arb_texture_query_levels: add compiler tests for textureQueryLevels()

2013-10-07 Thread Ian Romanick
On 10/04/2013 09:08 PM, Chris Forbes wrote:
 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 000..d6a19ba
 --- /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

Does all the hardware that supports one also support the other?  If not,
then we should split the GL_ARB_texture_cube_map_array tests out into
separate .frag and .vert files.

Also, we should all .geom versions for 1.50. :)  That should just be a
sed job.

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 4/5] arb_texture_query_levels: add compiler tests for textureQueryLevels()

2013-10-04 Thread Chris Forbes
This tests that all the required signatures exist.

Signed-off-by: Chris Forbes chr...@ijw.co.nz
---
 .../compiler/builtin-functions-float-samplers.frag | 46 ++
 .../compiler/builtin-functions-float-samplers.vert | 46 ++
 .../compiler/builtin-functions-int-samplers.frag   | 32 +++
 .../compiler/builtin-functions-int-samplers.vert   | 32 +++
 .../compiler/builtin-functions-uint-samplers.frag  | 32 +++
 .../compiler/builtin-functions-uint-samplers.vert  | 32 +++
 6 files changed, 220 insertions(+)
 create mode 100644 
tests/spec/arb_texture_query_levels/compiler/builtin-functions-float-samplers.frag
 create mode 100644 
tests/spec/arb_texture_query_levels/compiler/builtin-functions-float-samplers.vert
 create mode 100644 
tests/spec/arb_texture_query_levels/compiler/builtin-functions-int-samplers.frag
 create mode 100644 
tests/spec/arb_texture_query_levels/compiler/builtin-functions-int-samplers.vert
 create mode 100644 
tests/spec/arb_texture_query_levels/compiler/builtin-functions-uint-samplers.frag
 create mode 100644 
tests/spec/arb_texture_query_levels/compiler/builtin-functions-uint-samplers.vert

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 000..d6a19ba
--- /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 000..2e66e94
--- /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 000..56c29e4
--- /dev/null
+++