[Piglit] [PATCH 3/9] arb_enhanced_layouts: Add more xfb_stride redeclaration tests
Andres Gomez
agomez at igalia.com
Wed Oct 26 16:14:10 UTC 2016
>From the GL_ARB_enhanced_layouts spec:
"While *xfb_stride* can be declared multiple times for the same buffer,
it is a compile-time or link-time error to have different values
specified for the stride for the same buffer."
Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com>
Signed-off-by: Andres Gomez <agomez at igalia.com>
---
.../xfb_stride/block-stride-match-global.vert | 31 ++++++++++++++++++++++
.../xfb_stride/block-stride-match.vert | 29 ++++++++++++++++++++
.../xfb_stride/block-stride-mismatch-global.vert | 31 ++++++++++++++++++++++
.../xfb_stride/block-stride-mismatch.vert | 29 ++++++++++++++++++++
.../xfb_stride/global-stride-match.vert | 22 +++++++++++++++
.../xfb_stride/global-stride-mismatch.vert | 22 +++++++++++++++
.../named-block-stride-match-global.vert | 31 ++++++++++++++++++++++
.../xfb_stride/named-block-stride-match.vert | 29 ++++++++++++++++++++
.../named-block-stride-mismatch-global.vert | 31 ++++++++++++++++++++++
.../xfb_stride/named-block-stride-mismatch.vert | 29 ++++++++++++++++++++
.../xfb_stride/variable-stride-match-global.vert | 26 ++++++++++++++++++
.../xfb_stride/variable-stride-match.vert | 24 +++++++++++++++++
.../variable-stride-mismatch-global.vert | 6 ++---
.../xfb_stride/variable-stride-mismatch.vert | 6 ++---
14 files changed, 340 insertions(+), 6 deletions(-)
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match-global.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch-global.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-match.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match-global.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch-global.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match-global.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match.vert
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match-global.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match-global.vert
new file mode 100644
index 0000000..b9fadb4
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match-global.vert
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_buffer = 0) out block1 {
+ vec4 var;
+};
+
+layout(xfb_stride = 20) out block2 {
+ vec4 var2;
+};
+
+void main()
+{
+ var = vec4(1.0);
+ var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match.vert
new file mode 100644
index 0000000..fbc84da
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match.vert
@@ -0,0 +1,29 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20) out block1 {
+ vec4 var;
+};
+
+layout(xfb_buffer = 0, xfb_stride = 20) out block2 {
+ vec4 var2;
+};
+
+void main()
+{
+ var = vec4(1.0);
+ var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch-global.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch-global.vert
new file mode 100644
index 0000000..2adfa30
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch-global.vert
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_buffer = 0) out block1 {
+ vec4 var;
+};
+
+layout(xfb_stride = 32) out block2 {
+ vec4 var2;
+};
+
+void main()
+{
+ var = vec4(1.0);
+ var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch.vert
new file mode 100644
index 0000000..baa72e8
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch.vert
@@ -0,0 +1,29 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20) out block1 {
+ vec4 var;
+};
+
+layout(xfb_buffer = 0, xfb_stride = 32) out block2 {
+ vec4 var2;
+};
+
+void main()
+{
+ var = vec4(1.0);
+ var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-match.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-match.vert
new file mode 100644
index 0000000..f24946e
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-match.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20) out;
+layout(xfb_buffer = 0, xfb_stride = 20) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-mismatch.vert
new file mode 100644
index 0000000..0740344
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-mismatch.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20) out;
+layout(xfb_buffer = 0, xfb_stride = 32) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match-global.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match-global.vert
new file mode 100644
index 0000000..2211743
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match-global.vert
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_buffer = 0) out block1 {
+ vec4 var;
+} b1;
+
+layout(xfb_stride = 20) out block2 {
+ vec4 var2;
+} b2;
+
+void main()
+{
+ b1.var = vec4(1.0);
+ b2.var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match.vert
new file mode 100644
index 0000000..0948be6
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match.vert
@@ -0,0 +1,29 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20) out block1 {
+ vec4 var;
+} b1;
+
+layout(xfb_buffer = 0, xfb_stride = 20) out block2 {
+ vec4 var2;
+} b2;
+
+void main()
+{
+ b1.var = vec4(1.0);
+ b2.var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch-global.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch-global.vert
new file mode 100644
index 0000000..bfd59a2
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch-global.vert
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_buffer = 0) out block1 {
+ vec4 var;
+} b1;
+
+layout(xfb_stride = 32) out block2 {
+ vec4 var2;
+} b2;
+
+void main()
+{
+ b1.var = vec4(1.0);
+ b2.var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch.vert
new file mode 100644
index 0000000..8e019fb
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch.vert
@@ -0,0 +1,29 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20) out block1 {
+ vec4 var;
+} b1;
+
+layout(xfb_buffer = 0, xfb_stride = 32) out block2 {
+ vec4 var2;
+} b2;
+
+void main()
+{
+ b1.var = vec4(1.0);
+ b2.var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match-global.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match-global.vert
new file mode 100644
index 0000000..3c8bdcf
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match-global.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_buffer = 0) out vec4 var;
+layout(xfb_stride = 20) out vec4 var2;
+
+void main()
+{
+ var = vec4(1.0);
+ var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match.vert
new file mode 100644
index 0000000..17bf2e3
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "While *xfb_stride* can be declared multiple times for the same buffer,
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20) out vec4 var;
+layout(xfb_buffer = 0, xfb_stride = 20) out vec4 var2;
+
+void main()
+{
+ var = vec4(1.0);
+ var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch-global.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch-global.vert
index b8184ba..ad05b6a 100644
--- a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch-global.vert
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch-global.vert
@@ -8,8 +8,8 @@
// From the GL_ARB_enhanced_layouts spec:
//
// "While *xfb_stride* can be declared multiple times for the same buffer,
-// it is a compile-time or link-time error to have different values
-// specified for the stride for the same buffer."
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
#version 140
#extension GL_ARB_enhanced_layouts: require
@@ -17,7 +17,7 @@
layout(xfb_stride = 20, xfb_buffer = 0) out;
layout(xfb_buffer = 0) out vec4 var;
-layout(xfb_offset = 16, xfb_stride = 32) out vec4 var2;
+layout(xfb_stride = 32) out vec4 var2;
void main()
{
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch.vert
index 55fb2af..ee03d5c 100644
--- a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch.vert
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch.vert
@@ -8,14 +8,14 @@
// From the GL_ARB_enhanced_layouts spec:
//
// "While *xfb_stride* can be declared multiple times for the same buffer,
-// it is a compile-time or link-time error to have different values
-// specified for the stride for the same buffer."
+// it is a compile-time or link-time error to have different values
+// specified for the stride for the same buffer."
#version 140
#extension GL_ARB_enhanced_layouts: require
layout(xfb_stride = 20) out vec4 var;
-layout(xfb_offset = 16, xfb_stride = 32) out vec4 var2;
+layout(xfb_buffer = 0, xfb_stride = 32) out vec4 var2;
void main()
{
--
2.9.3
More information about the Piglit
mailing list