[Piglit] [PATCH 1/2] arb_enhanced_layouts: additional xfb_offset test

Timothy Arceri timothy.arceri at collabora.com
Thu May 19 01:07:57 UTC 2016


---
 .../invalid-nested-struct-with-double.vert         | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-nested-struct-with-double.vert

diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-nested-struct-with-double.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-nested-struct-with-double.vert
new file mode 100644
index 0000000..21afe15
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-nested-struct-with-double.vert
@@ -0,0 +1,34 @@
+// [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 S1 {
+  float x1;
+  double y;
+};
+
+struct S2 {
+  float x2;
+  S1 s;
+};
+
+layout(xfb_offset = 4) out S2 s;
+
+void main()
+{
+}
-- 
2.5.5



More information about the Piglit mailing list