[Piglit] [PATCH 3/6] gs: Test uniforms and constants in GLSL 1.50 geometry shaders.
Paul Berry
stereotype441 at gmail.com
Sat Jul 27 06:10:04 PDT 2013
These tests are parallel to the equivalently-named tests in
tests/spec/arb_geometry_shader4, except that they verify that the
uniforms and constants can be used in GLSL 1.50 geometry shaders
rather than ARB_geometry_shader4 geometry shaders.
---
tests/spec/glsl-1.50/compiler/constants.geom | 35 ++++++++++++++++++++++++++++
tests/spec/glsl-1.50/compiler/uniforms.geom | 16 +++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 tests/spec/glsl-1.50/compiler/constants.geom
create mode 100644 tests/spec/glsl-1.50/compiler/uniforms.geom
diff --git a/tests/spec/glsl-1.50/compiler/constants.geom b/tests/spec/glsl-1.50/compiler/constants.geom
new file mode 100644
index 0000000..9513d75
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/constants.geom
@@ -0,0 +1,35 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// [end config]
+//
+// Verify that all constants defined in GLSL 1.50 core are accessible from
+// geometry shaders.
+
+#version 150
+
+void main()
+{
+ int i = 0;
+ i += gl_MaxVertexAttribs;
+ i += gl_MaxVertexUniformComponents;
+ i += gl_MaxVaryingFloats;
+ i += gl_MaxVaryingComponents;
+ i += gl_MaxVertexOutputComponents;
+ i += gl_MaxGeometryInputComponents;
+ i += gl_MaxGeometryOutputComponents;
+ i += gl_MaxFragmentInputComponents;
+ i += gl_MaxVertexTextureImageUnits;
+ i += gl_MaxCombinedTextureImageUnits;
+ i += gl_MaxTextureImageUnits;
+ i += gl_MaxFragmentUniformComponents;
+ i += gl_MaxDrawBuffers;
+ i += gl_MaxClipDistances;
+ i += gl_MaxGeometryTextureImageUnits;
+ i += gl_MaxGeometryOutputVertices;
+ i += gl_MaxGeometryTotalOutputComponents;
+ i += gl_MaxGeometryUniformComponents;
+ i += gl_MaxGeometryVaryingComponents;
+ gl_Position = vec4(i);
+ EmitVertex();
+}
diff --git a/tests/spec/glsl-1.50/compiler/uniforms.geom b/tests/spec/glsl-1.50/compiler/uniforms.geom
new file mode 100644
index 0000000..52f0afd
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/uniforms.geom
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// [end config]
+//
+// Verify that all uniforms defined in GLSL 1.50 core are accessible from
+// geometry shaders.
+
+#extension GL_ARB_geometry_shader4: enable
+
+void main()
+{
+ gl_Position = vec4(gl_DepthRange.near, gl_DepthRange.far, gl_DepthRange.diff,
+ 0.0);
+ EmitVertex();
+}
--
1.8.3.4
More information about the Piglit
mailing list