[Piglit] [PATCH] arb_enhanced_layouts: test a case with explicit non-zero offset in named UBOs

Nicolai Hähnle nhaehnle at gmail.com
Mon Oct 31 20:55:45 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

This shows an error in UBO load lowering.
---
 .../fs-ubo-named-block-explicit-offset.shader_test | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/execution/fs-ubo-named-block-explicit-offset.shader_test

diff --git a/tests/spec/arb_enhanced_layouts/execution/fs-ubo-named-block-explicit-offset.shader_test b/tests/spec/arb_enhanced_layouts/execution/fs-ubo-named-block-explicit-offset.shader_test
new file mode 100644
index 0000000..7af7454
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/execution/fs-ubo-named-block-explicit-offset.shader_test
@@ -0,0 +1,30 @@
+# Test access to a uniform buffer object via dereferencing the block name,
+# where the first member has an explicit, non-zero offset.
+
+[require]
+GLSL >= 1.50
+GL_ARB_enhanced_layouts
+GL_ARB_uniform_buffer_object
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_enhanced_layouts : require
+#extension GL_ARB_uniform_buffer_object : require
+
+layout(std140) uniform Block {
+    layout(offset = 16) vec4 a;
+} block_name;
+
+out vec4 outcolor;
+
+void main()
+{
+    outcolor = block_name.a;
+}
+
+[test]
+uniform vec4 Block.a 0.25 1.0 0.33 1.0
+
+draw rect -1 -1 2 2
+probe all rgba 0.25 1.0 0.33 1.0
-- 
2.7.4



More information about the Piglit mailing list