[Piglit] [PATCH 5/8] arb_enhanced_layouts: compile test component layout on a named block member
Timothy Arceri
timothy.arceri at collabora.com
Sun Nov 29 14:19:54 PST 2015
---
.../component-layout/block-member-named.frag | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/block-member-named.frag
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/block-member-named.frag b/tests/spec/arb_enhanced_layouts/compiler/component-layout/block-member-named.frag
new file mode 100644
index 0000000..78e7e3a
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/block-member-named.frag
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location GL_ARB_separate_shader_objects
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+// "Of these, variables and block members (but not blocks) additionally
+// allow the component layout qualifier."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_explicit_attrib_location: require
+#extension GL_ARB_separate_shader_objects: require
+
+in block {
+ layout(location = 1, component = 3) float f;
+} name;
+
+float foo(void) {
+ return name.f;
+}
--
2.4.3
More information about the Piglit
mailing list