[Piglit] [PATCH 2/2 v2] arb_uniform_buffer_object: Only use row_major or column_major on matrix types

Ian Romanick idr at freedesktop.org
Mon Jan 28 12:31:58 PST 2013


From: Ian Romanick <ian.d.romanick at intel.com>

OpenGL ES 3.0 requires that the row_major and column_major layout
qualifiers only be accepted on matrix types.  Previously this test would
put the layout qualifier on any type.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 .../arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c b/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c
index 3450f8d..5797647 100644
--- a/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c
+++ b/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c
@@ -87,7 +87,7 @@ test_format(const struct uniform_type *type, bool row_major)
 		deref = "u[0].x";
 
 	asprintf(&fs_source, fs_template,
-		 row_major ? "layout(row_major) " : "",
+		 row_major && type->size > 16 ? "layout(row_major) " : "",
 		 type->type,
 		 deref);
 	fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_source);
-- 
1.7.11.7



More information about the Piglit mailing list