[10/10] arb_enhanced_layouts: add xfb_offset overlap test

Submitted by Andres Gomez on Feb. 1, 2019, 5:55 p.m.

Details

Message ID 20190201175524.24454-11-agomez@igalia.com
State Superseded
Headers show
Series "arb_enhanced_layouts: additional tests" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Andres Gomez Feb. 1, 2019, 5:55 p.m.
From the GL_ARB_enhanced_layouts spec:

  " No aliasing in output buffers is allowed: It is a compile-time or
    link-time error to specify variables with overlapping transform
    feedback offsets."

Cc: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
---
 .../xfb_offset/invalid-overlap.vert           | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert
new file mode 100644
index 000000000..0c523378b
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert
@@ -0,0 +1,23 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//   " No aliasing in output buffers is allowed: It is a compile-time
+//     or link-time error to specify variables with overlapping
+//     transform feedback offsets."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_offset = 0) out vec4 a;
+layout(xfb_offset = 0) out vec4 b;
+
+void main()
+{
+  a = vec4(1.0);
+  b = vec4(0.0);
+}