[Piglit] [PATCH 3/3] arb_enhanced_layouts: xfb_stride layout qualifier compile tests
Timothy Arceri
timothy.arceri at collabora.com
Mon Feb 15 03:22:04 UTC 2016
---
.../xfb_stride/block-explicit-max.vert | 22 +++++++++++++
.../xfb_stride/block-explicit-too-large.vert | 22 +++++++++++++
.../xfb_stride/global-explicit-max.vert | 22 +++++++++++++
.../xfb_stride/global-explicit-too-large.vert | 22 +++++++++++++
.../xfb_stride/type-arrays.vert | 36 ++++++++++++++++++++++
.../xfb_stride/types.vert | 36 ++++++++++++++++++++++
.../xfb_stride/variable-explicit-max.vert | 20 ++++++++++++
.../xfb_stride/variable-explicit-too-large.vert | 20 ++++++++++++
8 files changed, 200 insertions(+)
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-explicit-max.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-explicit-too-large.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-explicit-max.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-explicit-too-large.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/type-arrays.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/types.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-explicit-max.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-explicit-too-large.vert
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-explicit-max.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-explicit-max.vert
new file mode 100644
index 0000000..06ba9be
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-explicit-max.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The resulting stride (implicit or explicit) must be less than or equal
+// to the implementation-dependent constant
+// gl_MaxTransformFeedbackInterleavedComponents."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_stride = gl_MaxTransformFeedbackInterleavedComponents) out block {
+ vec4 var;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-explicit-too-large.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-explicit-too-large.vert
new file mode 100644
index 0000000..7e96e90
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-explicit-too-large.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The resulting stride (implicit or explicit) must be less than or equal
+// to the implementation-dependent constant
+// gl_MaxTransformFeedbackInterleavedComponents."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_stride = gl_MaxTransformFeedbackInterleavedComponents + 1) out block {
+ vec4 var;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-explicit-max.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-explicit-max.vert
new file mode 100644
index 0000000..58c79c2
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-explicit-max.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The resulting stride (implicit or explicit) must be less than or equal
+// to the implementation-dependent constant
+// gl_MaxTransformFeedbackInterleavedComponents."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_stride = gl_MaxTransformFeedbackInterleavedComponents) out;
+
+out vec4 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-explicit-too-large.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-explicit-too-large.vert
new file mode 100644
index 0000000..c431d79
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-explicit-too-large.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The resulting stride (implicit or explicit) must be less than or equal
+// to the implementation-dependent constant
+// gl_MaxTransformFeedbackInterleavedComponents."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_stride = gl_MaxTransformFeedbackInterleavedComponents + 1) out;
+
+out vec4 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/type-arrays.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/type-arrays.vert
new file mode 100644
index 0000000..f13e291
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/type-arrays.vert
@@ -0,0 +1,36 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "Variables and block members qualified with *xfb_offset* can be scalars,
+// vectors, matrices, structures, and (sized) arrays of these. The offset
+// must be a multiple of the size of the first component of the first
+// qualified variable or block member, or a compile-time error results.
+// Further, if applied to an aggregate containing a double, the offset must
+// also be a multiple of 8, and the space taken in the buffer will be a
+// multiple of 8."
+//
+// We take this to mean xfb_stride can also qualify these types.
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+struct S {
+ vec3 x;
+};
+
+layout(xfb_stride = 4) out float var1[2];
+
+layout(xfb_stride = 8) out vec4 var2[2];
+
+layout(xfb_stride = 64) out mat4 var3[2];
+
+layout(xfb_stride = 12) out S s[2];
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/types.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/types.vert
new file mode 100644
index 0000000..746f20f
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/types.vert
@@ -0,0 +1,36 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "Variables and block members qualified with *xfb_offset* can be scalars,
+// vectors, matrices, structures, and (sized) arrays of these. The offset
+// must be a multiple of the size of the first component of the first
+// qualified variable or block member, or a compile-time error results.
+// Further, if applied to an aggregate containing a double, the offset must
+// also be a multiple of 8, and the space taken in the buffer will be a
+// multiple of 8."
+//
+// We take this to mean xfb_buffer can also qualify these types.
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+struct S {
+ vec3 x;
+};
+
+layout(xfb_stride = 4) out float var1;
+
+layout(xfb_stride = 8) out vec4 var2;
+
+layout(xfb_stride = 64) out mat4 var3;
+
+layout(xfb_stride = 12) out S s;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-explicit-max.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-explicit-max.vert
new file mode 100644
index 0000000..717244b
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-explicit-max.vert
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The resulting stride (implicit or explicit) must be less than or equal
+// to the implementation-dependent constant
+// gl_MaxTransformFeedbackInterleavedComponents."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = gl_MaxTransformFeedbackInterleavedComponents) out vec4 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-explicit-too-large.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-explicit-too-large.vert
new file mode 100644
index 0000000..f369b99
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-explicit-too-large.vert
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The resulting stride (implicit or explicit) must be less than or equal
+// to the implementation-dependent constant
+// gl_MaxTransformFeedbackInterleavedComponents."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = gl_MaxTransformFeedbackInterleavedComponents + 1) out vec4 var;
+
+void main()
+{
+}
--
2.5.0
More information about the Piglit
mailing list