[v2,3/6] nv_non_square_matrices: Add tests for the preprocessor define

Submitted by Rafal Mielniczuk on Feb. 27, 2014, 2:02 p.m.

Details

Message ID 1393509748-12864-4-git-send-email-rafal.mielniczuk2@gmail.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Rafal Mielniczuk Feb. 27, 2014, 2:02 p.m.
Signed-off-by: Rafal Mielniczuk <rafal.mielniczuk2@gmail.com>
---
 .../spec/nv_non_square_matrices/compiler/define.vert  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 tests/spec/nv_non_square_matrices/compiler/define.vert

Patch hide | download patch | download mbox

diff --git a/tests/spec/nv_non_square_matrices/compiler/define.vert b/tests/spec/nv_non_square_matrices/compiler/define.vert
new file mode 100644
index 0000000..168662d
--- /dev/null
+++ b/tests/spec/nv_non_square_matrices/compiler/define.vert
@@ -0,0 +1,19 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+// require_extensions: GL_NV_non_square_matrices
+// [end config]
+
+#version 100
+#extension GL_NV_non_square_matrices: require
+
+#if !defined GL_NV_non_square_matrices
+#  error GL_NV_non_square_matrices is not defined
+#elif GL_NV_non_square_matrices != 1
+#  error GL_NV_non_square_matrices is not equal to 1
+#endif
+
+/* Some compilers generate spurious errors if a shader does not contain
+ * any code or declarations.
+ */
+int foo(void) { return 1; }