[Piglit] [PATCH 1/3] arb_enhanced_layouts: xfb_offset layout qualifier compile tests
Timothy Arceri
timothy.arceri at collabora.com
Mon Feb 15 03:22:02 UTC 2016
---
.../xfb_offset/block-member.vert | 23 +++++++++++++++
.../xfb_offset/block-with-double.vert | 26 +++++++++++++++++
.../xfb_offset/block.vert | 23 +++++++++++++++
.../xfb_offset/global.vert | 19 ++++++++++++
.../xfb_offset/invalid-block-with-double.vert | 26 +++++++++++++++++
.../xfb_offset/invalid-block.vert | 22 ++++++++++++++
.../xfb_offset/invalid-struct-with-double.vert | 28 ++++++++++++++++++
.../xfb_offset/invalid-struct.vert | 24 +++++++++++++++
.../xfb_offset/invalid-variable.vert | 20 +++++++++++++
.../xfb_offset/named-block-member.vert | 23 +++++++++++++++
.../xfb_offset/named-block.vert | 23 +++++++++++++++
.../xfb_offset/struct-with-double.vert | 28 ++++++++++++++++++
.../xfb_offset/type-arrays.vert | 34 ++++++++++++++++++++++
.../xfb_offset/types.vert | 34 ++++++++++++++++++++++
.../xfb_offset/unsized-array.vert | 19 ++++++++++++
.../xfb_offset/variable.vert | 20 +++++++++++++
16 files changed, 392 insertions(+)
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block-member.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block-with-double.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/global.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-block-with-double.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-block.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-struct-with-double.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-struct.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-variable.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/named-block-member.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/named-block.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/struct-with-double.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/type-arrays.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/types.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/unsized-array.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/variable.vert
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block-member.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block-member.vert
new file mode 100644
index 0000000..b54175e
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block-member.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The *xfb_offset* qualifier assigns a byte offset within a transform
+// feedback buffer. Only variables, block members, or blocks can be
+// qualified with *xfb_offset*."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+out block {
+ vec4 var1;
+ layout(xfb_offset = 0) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block-with-double.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block-with-double.vert
new file mode 100644
index 0000000..29d0dac
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block-with-double.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "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."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_gpu_shader_fp64: require
+
+layout(xfb_offset = 8) out block {
+ vec4 var1;
+ dvec3 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block.vert
new file mode 100644
index 0000000..8c3e4e2
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/block.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The *xfb_offset* qualifier assigns a byte offset within a transform
+// feedback buffer. Only variables, block members, or blocks can be
+// qualified with *xfb_offset*."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_offset = 16) out block {
+ vec4 var1;
+ layout(xfb_offset = 0) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/global.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/global.vert
new file mode 100644
index 0000000..a301e15
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/global.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "Only variables, block members, or blocks can be qualified with
+// *xfb_offset*."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_offset = 0) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-block-with-double.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-block-with-double.vert
new file mode 100644
index 0000000..8af10e0
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-block-with-double.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "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."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_gpu_shader_fp64: require
+
+layout(xfb_offset = 4) out block {
+ vec4 var1;
+ dvec3 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-block.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-block.vert
new file mode 100644
index 0000000..9f5e0c2
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-block.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 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."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_offset = 2) out block {
+ vec4 var;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-struct-with-double.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-struct-with-double.vert
new file mode 100644
index 0000000..b4fa4ba
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-struct-with-double.vert
@@ -0,0 +1,28 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "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."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_gpu_shader_fp64: require
+
+struct S {
+ float x;
+ double y;
+};
+
+layout(xfb_offset = 4) out S s;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-struct.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-struct.vert
new file mode 100644
index 0000000..426813c
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-struct.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "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."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+struct S {
+ float x;
+};
+
+layout(xfb_offset = 2) out S s;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-variable.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-variable.vert
new file mode 100644
index 0000000..bd684af
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-variable.vert
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "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."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_offset = 2) out vec4 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/named-block-member.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/named-block-member.vert
new file mode 100644
index 0000000..91c6cd0
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/named-block-member.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The *xfb_offset* qualifier assigns a byte offset within a transform
+// feedback buffer. Only variables, block members, or blocks can be
+// qualified with *xfb_offset*."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+out block {
+ vec4 var1;
+ layout(xfb_offset = 0) vec4 var2;
+} block_name;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/named-block.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/named-block.vert
new file mode 100644
index 0000000..086cbef
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/named-block.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "The *xfb_offset* qualifier assigns a byte offset within a transform
+// feedback buffer. Only variables, block members, or blocks can be
+// qualified with *xfb_offset*."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_offset = 16) out block {
+ vec4 var1;
+ layout(xfb_offset = 0) vec4 var2;
+} block_name;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/struct-with-double.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/struct-with-double.vert
new file mode 100644
index 0000000..013c13c
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/struct-with-double.vert
@@ -0,0 +1,28 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "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."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_gpu_shader_fp64: require
+
+struct S {
+ float x;
+ double y;
+};
+
+layout(xfb_offset = 8) out S s;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/type-arrays.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/type-arrays.vert
new file mode 100644
index 0000000..ee095f6
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/type-arrays.vert
@@ -0,0 +1,34 @@
+// [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."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+struct S {
+ vec3 x;
+};
+
+layout(xfb_offset = 32) out float var1[2];
+
+layout(xfb_offset = 0) out vec4 var2[2];
+
+layout(xfb_offset = 64) out mat4 var3[2];
+
+layout(xfb_offset = 40) out S s[2];
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/types.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/types.vert
new file mode 100644
index 0000000..13f725a
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/types.vert
@@ -0,0 +1,34 @@
+// [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."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+struct S {
+ vec3 x;
+};
+
+layout(xfb_offset = 16) out float var1;
+
+layout(xfb_offset = 0) out vec4 var2;
+
+layout(xfb_offset = 32) out mat4 var3;
+
+layout(xfb_offset = 20) out S s;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/unsized-array.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/unsized-array.vert
new file mode 100644
index 0000000..dec7acd
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/unsized-array.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+// "It is a compile-time error to apply xfb_offset to the declaration of an
+// unsized array."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_offset = 0) out vec4 var[];
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/variable.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/variable.vert
new file mode 100644
index 0000000..5e639e7
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/variable.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 *xfb_offset* qualifier assigns a byte offset within a transform
+// feedback buffer. Only variables, block members, or blocks can be
+// qualified with *xfb_offset*."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_offset = 16) out vec4 var1;
+
+void main()
+{
+}
--
2.5.0
More information about the Piglit
mailing list