[Piglit] [PATCH] arb_enhanced_layouts: xfb_buffer layout qualifier compile tests

Timothy Arceri timothy.arceri at collabora.com
Thu Jan 21 00:18:11 PST 2016


---
 ...ck-larger-than-gl_TransformFeedbackBuffers.vert | 22 ++++++++++++++
 .../xfb-buffer/xfb_buffer-block-max.vert           | 22 ++++++++++++++
 .../xfb_buffer-block-member-global-mismatch.vert   | 35 ++++++++++++++++++++++
 .../xfb_buffer-block-member-mismatch.vert          | 33 ++++++++++++++++++++
 .../xfb_buffer-block-member-mismatch2.vert         | 33 ++++++++++++++++++++
 .../xfb-buffer/xfb_buffer-block-member.vert        | 33 ++++++++++++++++++++
 ...al-larger-than-gl_TransformFeedbackBuffers.vert | 22 ++++++++++++++
 .../xfb-buffer/xfb_buffer-global-max.vert          | 22 ++++++++++++++
 .../xfb-buffer/xfb_buffer-multiple-qualifiers.vert | 28 +++++++++++++++++
 ..._buffer-named-block-member-global-mismatch.vert | 35 ++++++++++++++++++++++
 .../xfb_buffer-named-block-member-mismatch.vert    | 33 ++++++++++++++++++++
 .../xfb_buffer-named-block-member-mismatch2.vert   | 33 ++++++++++++++++++++
 .../xfb-buffer/xfb_buffer-named-block-member.vert  | 33 ++++++++++++++++++++
 ...le-larger-than-gl_TransformFeedbackBuffers.vert | 20 +++++++++++++
 .../xfb-buffer/xfb_buffer-variable-max.vert        | 20 +++++++++++++
 15 files changed, 424 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-larger-than-gl_TransformFeedbackBuffers.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-max.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-global-mismatch.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch2.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-larger-than-gl_TransformFeedbackBuffers.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-max.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-multiple-qualifiers.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-global-mismatch.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch2.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-larger-than-gl_TransformFeedbackBuffers.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-max.vert

diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-larger-than-gl_TransformFeedbackBuffers.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-larger-than-gl_TransformFeedbackBuffers.vert
new file mode 100644
index 0000000..ea5ea36
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-larger-than-gl_TransformFeedbackBuffers.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:
+//
+//    "It is a compile-time error to specify an *xfb_buffer* that is greater
+//    than the implementation-dependent constant
+//    gl_MaxTransformFeedbackBuffers."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = gl_MaxTransformFeedbackBuffers) out block {
+  vec4 var;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-max.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-max.vert
new file mode 100644
index 0000000..adac1ab
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-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:
+//
+//    "It is a compile-time error to specify an *xfb_buffer* that is greater
+//    than the implementation-dependent constant
+//    gl_MaxTransformFeedbackBuffers."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = gl_MaxTransformFeedbackBuffers - 1) out block {
+  vec4 var;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-global-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-global-mismatch.vert
new file mode 100644
index 0000000..ae95c34
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-global-mismatch.vert
@@ -0,0 +1,35 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "Shaders in the transform feedback capturing mode have an initial global
+//    default of
+//
+//        layout(xfb_buffer = 0) out;"
+//
+//    ...
+//
+//    "When a variable or output block is declared without an xfb_buffer
+//    qualifier, it inherits the global default buffer. When a variable or
+//    output block is declared with an xfb_buffer qualifier, it has that 
+//    declared buffer. All members of a block inherit the block's buffer. A 
+//    member is allowed to declare an xfb_buffer, but it must match the buffer
+//    inherited from its block, or a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = 1) out;
+
+out block {
+  vec4 var1;
+  layout(xfb_buffer = 0) vec4 var2; // xfb_buffer must be 1
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch.vert
new file mode 100644
index 0000000..d5f000b
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch.vert
@@ -0,0 +1,33 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "Shaders in the transform feedback capturing mode have an initial global
+//    default of
+//
+//        layout(xfb_buffer = 0) out;"
+//
+//    ...
+//
+//    "When a variable or output block is declared without an xfb_buffer
+//    qualifier, it inherits the global default buffer. When a variable or
+//    output block is declared with an xfb_buffer qualifier, it has that 
+//    declared buffer. All members of a block inherit the block's buffer. A 
+//    member is allowed to declare an xfb_buffer, but it must match the buffer
+//    inherited from its block, or a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+out block {
+  vec4 var1;
+  layout(xfb_buffer = 1) vec4 var2; // xfb_buffer must be 0
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch2.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch2.vert
new file mode 100644
index 0000000..1a535b7
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch2.vert
@@ -0,0 +1,33 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "Shaders in the transform feedback capturing mode have an initial global
+//    default of
+//
+//        layout(xfb_buffer = 0) out;"
+//
+//    ...
+//
+//    "When a variable or output block is declared without an xfb_buffer
+//    qualifier, it inherits the global default buffer. When a variable or
+//    output block is declared with an xfb_buffer qualifier, it has that 
+//    declared buffer. All members of a block inherit the block's buffer. A 
+//    member is allowed to declare an xfb_buffer, but it must match the buffer
+//    inherited from its block, or a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_buffer = 1) out block {
+  vec4 var1;
+  layout(xfb_buffer = 0) vec4 var2; // xfb_buffer must be 1
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member.vert
new file mode 100644
index 0000000..287099b
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member.vert
@@ -0,0 +1,33 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "Shaders in the transform feedback capturing mode have an initial global
+//    default of
+//
+//        layout(xfb_buffer = 0) out;"
+//
+//    ...
+//
+//    "When a variable or output block is declared without an xfb_buffer
+//    qualifier, it inherits the global default buffer. When a variable or
+//    output block is declared with an xfb_buffer qualifier, it has that 
+//    declared buffer. All members of a block inherit the block's buffer. A 
+//    member is allowed to declare an xfb_buffer, but it must match the buffer
+//    inherited from its block, or a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+out block {
+  vec4 var1;
+  layout(xfb_buffer = 0) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-larger-than-gl_TransformFeedbackBuffers.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-larger-than-gl_TransformFeedbackBuffers.vert
new file mode 100644
index 0000000..cd3cb3d
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-larger-than-gl_TransformFeedbackBuffers.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:
+//
+//    "It is a compile-time error to specify an *xfb_buffer* that is greater
+//    than the implementation-dependent constant
+//    gl_MaxTransformFeedbackBuffers."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = gl_MaxTransformFeedbackBuffers) out;
+
+out vec4 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-max.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-max.vert
new file mode 100644
index 0000000..3636bae
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-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:
+//
+//    "It is a compile-time error to specify an *xfb_buffer* that is greater
+//    than the implementation-dependent constant
+//    gl_MaxTransformFeedbackBuffers."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = gl_MaxTransformFeedbackBuffers - 1) out;
+
+out vec4 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-multiple-qualifiers.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-multiple-qualifiers.vert
new file mode 100644
index 0000000..fdaf89d
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-multiple-qualifiers.vert
@@ -0,0 +1,28 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = 2) out;
+
+layout(xfb_buffer = 1) out block {
+  vec4 var1;
+  layout(xfb_buffer = 1) vec4 var2;
+};
+
+out block2 {
+  vec4 var1;
+  layout(xfb_buffer = 2) vec4 var2;
+} block_name;
+
+layout (xfb_buffer = 3) out;
+
+layout (xfb_buffer = 0) out vec4 var5;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-global-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-global-mismatch.vert
new file mode 100644
index 0000000..a51602a
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-global-mismatch.vert
@@ -0,0 +1,35 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "Shaders in the transform feedback capturing mode have an initial global
+//    default of
+//
+//        layout(xfb_buffer = 0) out;"
+//
+//    ...
+//
+//    "When a variable or output block is declared without an xfb_buffer
+//    qualifier, it inherits the global default buffer. When a variable or
+//    output block is declared with an xfb_buffer qualifier, it has that 
+//    declared buffer. All members of a block inherit the block's buffer. A 
+//    member is allowed to declare an xfb_buffer, but it must match the buffer
+//    inherited from its block, or a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = 1) out;
+
+out block {
+  vec4 var1;
+  layout(xfb_buffer = 0) vec4 var2; // xfb_buffer must be 1
+} block_name;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch.vert
new file mode 100644
index 0000000..5144639
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch.vert
@@ -0,0 +1,33 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "Shaders in the transform feedback capturing mode have an initial global
+//    default of
+//
+//        layout(xfb_buffer = 0) out;"
+//
+//    ...
+//
+//    "When a variable or output block is declared without an xfb_buffer
+//    qualifier, it inherits the global default buffer. When a variable or
+//    output block is declared with an xfb_buffer qualifier, it has that 
+//    declared buffer. All members of a block inherit the block's buffer. A 
+//    member is allowed to declare an xfb_buffer, but it must match the buffer
+//    inherited from its block, or a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+out block {
+  vec4 var1;
+  layout(xfb_buffer = 1) vec4 var2; // xfb_buffer must be 0
+} block_name;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch2.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch2.vert
new file mode 100644
index 0000000..325f160
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch2.vert
@@ -0,0 +1,33 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "Shaders in the transform feedback capturing mode have an initial global
+//    default of
+//
+//        layout(xfb_buffer = 0) out;"
+//
+//    ...
+//
+//    "When a variable or output block is declared without an xfb_buffer
+//    qualifier, it inherits the global default buffer. When a variable or
+//    output block is declared with an xfb_buffer qualifier, it has that 
+//    declared buffer. All members of a block inherit the block's buffer. A 
+//    member is allowed to declare an xfb_buffer, but it must match the buffer
+//    inherited from its block, or a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_buffer = 1) out block {
+  vec4 var1;
+  layout(xfb_buffer = 0) vec4 var2; // xfb_buffer must be 1
+} block_name;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member.vert
new file mode 100644
index 0000000..5c78783
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member.vert
@@ -0,0 +1,33 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "Shaders in the transform feedback capturing mode have an initial global
+//    default of
+//
+//        layout(xfb_buffer = 0) out;"
+//
+//    ...
+//
+//    "When a variable or output block is declared without an xfb_buffer
+//    qualifier, it inherits the global default buffer. When a variable or
+//    output block is declared with an xfb_buffer qualifier, it has that 
+//    declared buffer. All members of a block inherit the block's buffer. A 
+//    member is allowed to declare an xfb_buffer, but it must match the buffer
+//    inherited from its block, or a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+out block {
+  vec4 var1;
+  layout(xfb_buffer = 0) vec4 var2;
+} block_name;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-larger-than-gl_TransformFeedbackBuffers.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-larger-than-gl_TransformFeedbackBuffers.vert
new file mode 100644
index 0000000..33c7b72
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-larger-than-gl_TransformFeedbackBuffers.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:
+//
+//    "It is a compile-time error to specify an *xfb_buffer* that is greater
+//    than the implementation-dependent constant
+//    gl_MaxTransformFeedbackBuffers."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = gl_MaxTransformFeedbackBuffers) out vec4 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-max.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-max.vert
new file mode 100644
index 0000000..2ab6cd6
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-max.vert
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//    "It is a compile-time error to specify an *xfb_buffer* that is greater
+//    than the implementation-dependent constant
+//    gl_MaxTransformFeedbackBuffers."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = gl_MaxTransformFeedbackBuffers - 1) out vec4 var;
+
+void main()
+{
+}
-- 
2.4.3



More information about the Piglit mailing list