[Piglit] [PATCH] arb_uniform_buffer_object: Add UBO from vs-struct-pad tests
Ian Romanick
idr at freedesktop.org
Fri Aug 16 13:38:10 PDT 2013
From: Ian Romanick <ian.d.romanick at intel.com>
The vs-struct-pad and fs-struct-pad tests both fail on Mesa. The UBOs
from those tests are added here to help narrow down the origin of the
problem.
This test passes on NVIDIA (304.64 on GTX 260).
v2: Correct version of the patch to send to the list.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
.../spec/arb_uniform_buffer_object/layout-std140.c | 25 +++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/tests/spec/arb_uniform_buffer_object/layout-std140.c b/tests/spec/arb_uniform_buffer_object/layout-std140.c
index 43d0336..d76a0a5 100644
--- a/tests/spec/arb_uniform_buffer_object/layout-std140.c
+++ b/tests/spec/arb_uniform_buffer_object/layout-std140.c
@@ -69,6 +69,10 @@ static const struct result {
{ "o[1].l", 336, 2 },
{ "o[1].m", 368, 1 },
{ "o[1].n", 384, 2 },
+ { "s.s1.r", 0, 1 },
+ { "s.s2.g", 4, 1 },
+ { "s.s2.b", 8, 1 },
+ { "s.s2.a", 12, 1 },
};
static const char frag_shader_text[] =
@@ -95,9 +99,28 @@ static const char frag_shader_text[] =
" } o[2];\n"
"};\n"
"\n"
+ "struct S1 {\n"
+ " float r;\n"
+ "};\n"
+ "\n"
+ "struct S2 {\n"
+ " float g;\n"
+ " float b;\n"
+ " float a;\n"
+ "};\n"
+ "\n"
+ "struct S {\n"
+ " S1 s1;\n"
+ " S2 s2;\n"
+ "};\n"
+ "\n"
+ "layout(std140) uniform ubo1 {\n"
+ " S s;\n"
+ "};\n"
+ "\n"
"void main()\n"
"{\n"
- " gl_FragColor = vec4(a + b.x + c.x + float(f.d) + g + h[0] + i[0].x + o[1].k.x);\n"
+ " gl_FragColor = vec4(a + b.x + c.x + float(f.d) + g + h[0] + i[0].x + o[1].k.x + s.s1.r + s.s2.g + s.s2.b + s.s2.a);\n"
"}\n";
static void
--
1.8.1.4
More information about the Piglit
mailing list