[Piglit] [PATCH 1/2] Add tests for ARB_transform_feedback3

Marek Olšák maraeo at gmail.com
Thu Jul 5 03:40:35 PDT 2012


---
 tests/all.tests                                 |   11 +
 tests/spec/ext_transform_feedback/output-type.c |  624 ++++++++++++++++-------
 2 files changed, 445 insertions(+), 190 deletions(-)

diff --git a/tests/all.tests b/tests/all.tests
index 07eba93..22cb896 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -1778,6 +1778,17 @@ arb_transform_feedback2 = Group()
 spec['ARB_transform_feedback2'] = arb_transform_feedback2
 arb_transform_feedback2['draw-auto'] = PlainExecTest(['arb_transform_feedback2-draw-auto', '-auto'])
 
+arb_transform_feedback3 = Group()
+spec['ARB_transform_feedback3'] = arb_transform_feedback3
+
+for param in ['gl_NextBuffer-1', 'gl_NextBuffer-2', 'gl_SkipComponents1-1',
+              'gl_SkipComponents1-2', 'gl_SkipComponents1-3', 'gl_SkipComponents2',
+              'gl_SkipComponents3', 'gl_SkipComponents4',
+              'gl_NextBuffer-gl_SkipComponents1-gl_NextBuffer',
+              'gl_NextBuffer-gl_NextBuffer', 'gl_SkipComponents1234']:
+        arb_transform_feedback3[param] = concurrent_test(
+                'ext_transform_feedback-output-type {0}'.format(param))
+
 arb_uniform_buffer_object = Group()
 spec['ARB_uniform_buffer_object'] = arb_uniform_buffer_object
 import_glsl_parser_tests(spec['ARB_uniform_buffer_object'],
diff --git a/tests/spec/ext_transform_feedback/output-type.c b/tests/spec/ext_transform_feedback/output-type.c
index 8b82a1f..016eb01 100644
--- a/tests/spec/ext_transform_feedback/output-type.c
+++ b/tests/spec/ext_transform_feedback/output-type.c
@@ -35,15 +35,18 @@ PIGLIT_GL_TEST_MAIN(
     32 /*window_height*/,
     GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA)
 
+#define DEFAULT_VALUE 0.123456
+
 struct test_desc {
 	const char *name;
 	const char *vs;
 	unsigned num_varyings;
 	const char *varyings[16];
 	bool is_floating_point;
-	unsigned num_elements;
-	float expected_float[256];
-	GLint expected_int[256];
+	unsigned num_elements[4];
+	float expected_float[4][256];
+	GLint expected_int[4][256];
+	bool is_transform_feedback3;
 } tests[] = {
 	{
 		"float", /* name */
@@ -59,8 +62,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		1, /* num_elements, expected_float, expected_int */
-		{666}, {0}
+		{1}, /* num_elements, expected_float, expected_int */
+		{{666}}
 	},
 	{
 		"float[2]", /* name */
@@ -76,8 +79,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{666, 0.123}, {0}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{666, 0.123}}
 	},
 	{
 		"float[2]-no-subscript", /* name */
@@ -93,8 +96,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{666, 0.123}, {0}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{666, 0.123}}
 	},
 	{
 		"vec2", /* name */
@@ -110,8 +113,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{666, 999}, {0}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{666, 999}}
 	},
 	{
 		"vec2[2]", /* name */
@@ -127,8 +130,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{666, 999, -1.5, -20.0}, {0}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{666, 999, -1.5, -20.0}}
 	},
 	{
 		"vec2[2]-no-subscript", /* name */
@@ -144,8 +147,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{666, 999, -1.5, -20.0}, {0}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{666, 999, -1.5, -20.0}}
 	},
 	{
 		"vec3", /* name */
@@ -161,8 +164,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		3, /* num_elements, expected_float, expected_int */
-		{666, 999, -2}, {0}
+		{3}, /* num_elements, expected_float, expected_int */
+		{{666, 999, -2}}
 	},
 	{
 		"vec3[2]", /* name */
@@ -178,8 +181,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		6, /* num_elements, expected_float, expected_int */
-		{666, 999, -2, 0.4, 1.4, 3.5}, {0}
+		{6}, /* num_elements, expected_float, expected_int */
+		{{666, 999, -2, 0.4, 1.4, 3.5}}
 	},
 	{
 		"vec3[2]-no-subscript", /* name */
@@ -195,8 +198,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		6, /* num_elements, expected_float, expected_int */
-		{666, 999, -2, 0.4, 1.4, 3.5}, {0}
+		{6}, /* num_elements, expected_float, expected_int */
+		{{666, 999, -2, 0.4, 1.4, 3.5}}
 	},
 	{
 		"vec4", /* name */
@@ -212,8 +215,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2}, {0}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2}}
 	},
 	{
 		"vec4[2]", /* name */
@@ -229,8 +232,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30.0, 40.0}, {0}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30.0, 40.0}}
 	},
 	{
 		"vec4[2]-no-subscript", /* name */
@@ -246,8 +249,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30.0, 40.0}, {0}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30.0, 40.0}}
 	},
 	{
 		"mat2", /* name */
@@ -263,8 +266,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2}, {0}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2}}
 	},
 	{
 		"mat2[2]", /* name */
@@ -281,8 +284,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.34, 0.65, 0.14, -0.97}, {0}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.34, 0.65, 0.14, -0.97}}
 	},
 	{
 		"mat2[2]-no-subscript", /* name */
@@ -299,8 +302,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.34, 0.65, 0.14, -0.97}, {0}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.34, 0.65, 0.14, -0.97}}
 	},
 	{
 		"mat2x3", /* name */
@@ -316,8 +319,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		6, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4}, {0}
+		{6}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4}}
 	},
 	{
 		"mat2x3[2]", /* name */
@@ -334,8 +337,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		12, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 0.34, 0.12, -10.0, 30.1, 5.3, 9.8}, {0}
+		{12}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 0.34, 0.12, -10.0, 30.1, 5.3, 9.8}}
 	},
 	{
 		"mat2x3[2]-no-subscript", /* name */
@@ -352,8 +355,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		12, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 0.34, 0.12, -10.0, 30.1, 5.3, 9.8}, {0}
+		{12}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 0.34, 0.12, -10.0, 30.1, 5.3, 9.8}}
 	},
 	{
 		"mat2x4", /* name */
@@ -369,8 +372,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40}, {0}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40}}
 	},
 	{
 		"mat2x4[2]", /* name */
@@ -387,8 +390,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		16, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.12, 0.24, 0.34, 0.56, 0.67, 0.78, 0.89, 0.04}, {0}
+		{16}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.12, 0.24, 0.34, 0.56, 0.67, 0.78, 0.89, 0.04}}
 	},
 	{
 		"mat2x4[2]-no-subscript", /* name */
@@ -405,8 +408,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		16, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.12, 0.24, 0.34, 0.56, 0.67, 0.78, 0.89, 0.04}, {0}
+		{16}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.12, 0.24, 0.34, 0.56, 0.67, 0.78, 0.89, 0.04}}
 	},
 	{
 		"mat3x2", /* name */
@@ -423,8 +426,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		6, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0}, {0}
+		{6}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0}}
 	},
 	{
 		"mat3x2[2]", /* name */
@@ -441,8 +444,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		12, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 0.98, 0.87, 0.76, 0.65, 0.54, 0.43}, {0}
+		{12}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 0.98, 0.87, 0.76, 0.65, 0.54, 0.43}}
 	},
 	{
 		"mat3x2[2]-no-subscript", /* name */
@@ -459,8 +462,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		12, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 0.98, 0.87, 0.76, 0.65, 0.54, 0.43}, {0}
+		{12}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 0.98, 0.87, 0.76, 0.65, 0.54, 0.43}}
 	},
 	{
 		"mat3", /* name */
@@ -478,8 +481,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		9, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0}, {0}
+		{9}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0}}
 	},
 	{
 		"mat3[2]", /* name */
@@ -498,9 +501,9 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		18, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0,
-		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0}, {0}
+		{18}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0,
+		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0}}
 	},
 	{
 		"mat3[2]-no-subscript", /* name */
@@ -519,9 +522,9 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		18, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0,
-		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0}, {0}
+		{18}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0,
+		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0}}
 	},
 	{
 		"mat3x4", /* name */
@@ -540,8 +543,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		12, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0, 0.4, -4.1, -5.9}, {0}
+		{12}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0, 0.4, -4.1, -5.9}}
 	},
 	{
 		"mat3x4[2]", /* name */
@@ -560,9 +563,9 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		24, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0, 0.4, -4.1, -5.9,
-		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0, 0.4, -4.1, -5.9}, {0}
+		{24}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0, 0.4, -4.1, -5.9,
+		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0, 0.4, -4.1, -5.9}}
 	},
 	{
 		"mat3x4[2]-no-subscript", /* name */
@@ -581,9 +584,9 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		24, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0, 0.4, -4.1, -5.9,
-		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0, 0.4, -4.1, -5.9}, {0}
+		{24}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0, 0.2, 5.0, 3.0, 0.3, -10.0, 0.4, -4.1, -5.9,
+		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0, 0.4, -4.1, -5.9}}
 	},
 	{
 		"mat4x2", /* name */
@@ -599,8 +602,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40}, {0}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40}}
 	},
 	{
 		"mat4x2[2]", /* name */
@@ -617,9 +620,9 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		16, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40,
-		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6}, {0}
+		{16}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40,
+		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6}}
 	},
 	{
 		"mat4x2[2]-no-subscript", /* name */
@@ -636,9 +639,9 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		16, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40,
-		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6}, {0}
+		{16}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40,
+		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6}}
 	},
 	{
 		"mat4x3", /* name */
@@ -656,8 +659,8 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		12, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.3, 0.2, 0.1, 0.4}, {0}
+		{12}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.3, 0.2, 0.1, 0.4}}
 	},
 	{
 		"mat4x3[2]", /* name */
@@ -677,9 +680,9 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		24, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.3, 0.2, 0.1, 0.4,
-		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0, 0.4, -4.1, -5.9}, {0}
+		{24}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.3, 0.2, 0.1, 0.4,
+		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0, 0.4, -4.1, -5.9}}
 	},
 	{
 		"mat4x3[2]-no-subscript", /* name */
@@ -699,9 +702,9 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		24, /* num_elements, expected_float, expected_int */
-		{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.3, 0.2, 0.1, 0.4,
-		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0, 0.4, -4.1, -5.9}, {0}
+		{24}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666, 999, -2, 0.5, -0.4, 30, 40, 0.3, 0.2, 0.1, 0.4,
+		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0, 0.4, -4.1, -5.9}}
 	},
 	{
 		"mat4", /* name */
@@ -720,11 +723,11 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		16, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0,
+		{16}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0,
 		 0.2, 5.0, 3.0, 0.3,
 		 -10.0, 20.1, 52.4, -34.3,
-		 45.0, 56.0, 67.0, 78.0}, {0}
+		 45.0, 56.0, 67.0, 78.0}}
 	},
 	{
 		"mat4[2]", /* name */
@@ -743,13 +746,13 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		true, /* is_floating_point */
-		32, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0,
+		{32}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0,
 		 0.2, 5.0, 3.0, 0.3,
 		 -10.0, 20.1, 52.4, -34.3,
 		 45.0, 56.0, 67.0, 78.0,
 		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6,
-		 8.0, 0.4, -4.1, -5.9, -10.0, 0.4, -4.1, -5.9}, {0}
+		 8.0, 0.4, -4.1, -5.9, -10.0, 0.4, -4.1, -5.9}}
 	},
 	{
 		"mat4[2]-no-subscript", /* name */
@@ -768,13 +771,13 @@ struct test_desc {
 		{"r"},
 
 		true, /* is_floating_point */
-		32, /* num_elements, expected_float, expected_int */
-		{0.666, 666.0, 999.0, -2.0,
+		{32}, /* num_elements, expected_float, expected_int */
+		{{0.666, 666.0, 999.0, -2.0,
 		 0.2, 5.0, 3.0, 0.3,
 		 -10.0, 20.1, 52.4, -34.3,
 		 45.0, 56.0, 67.0, 78.0,
 		 20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6,
-		 8.0, 0.4, -4.1, -5.9, -10.0, 0.4, -4.1, -5.9}, {0}
+		 8.0, 0.4, -4.1, -5.9, -10.0, 0.4, -4.1, -5.9}}
 	},
 	{
 		"int", /* name */
@@ -790,8 +793,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		1, /* num_elements, expected_float, expected_int */
-		{0}, {2145948354}
+		{1}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{2145948354}}
 	},
 	{
 		"int[2]", /* name */
@@ -808,8 +811,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		false, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{0}, {-362245257, 2074398469}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{-362245257, 2074398469}}
 	},
 	{
 		"int[2]-no-subscript", /* name */
@@ -826,8 +829,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{0}, {-362245257, 2074398469}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{-362245257, 2074398469}}
 	},
 	{
 		"ivec2", /* name */
@@ -843,8 +846,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{0}, {408918569, -69869318}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{408918569, -69869318}}
 	},
 	{
 		"ivec2[2]", /* name */
@@ -861,8 +864,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		false, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{0}, {5703639, 654049542, 82927237, -1489678625}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{5703639, 654049542, 82927237, -1489678625}}
 	},
 	{
 		"ivec2[2]-no-subscript", /* name */
@@ -879,8 +882,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{0}, {5703639, 654049542, 82927237, -1489678625}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{5703639, 654049542, 82927237, -1489678625}}
 	},
 	{
 		"ivec3", /* name */
@@ -896,8 +899,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		3, /* num_elements, expected_float, expected_int */
-		{0}, {1402620337, -931103284, -1922128750}
+		{3}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{1402620337, -931103284, -1922128750}}
 	},
 	{
 		"ivec3[2]", /* name */
@@ -914,9 +917,9 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		false, /* is_floating_point */
-		6, /* num_elements, expected_float, expected_int */
-		{0}, {819762795, 292214138, 207695021,
-		     -541769145, -896550370, -322088831}
+		{6}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{819762795, 292214138, 207695021,
+		     -541769145, -896550370, -322088831}}
 	},
 	{
 		"ivec3[2]-no-subscript", /* name */
@@ -933,9 +936,9 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		6, /* num_elements, expected_float, expected_int */
-		{0}, {819762795, 292214138, 207695021,
-		     -541769145, -896550370, -322088831}
+		{6}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{819762795, 292214138, 207695021,
+		     -541769145, -896550370, -322088831}}
 	},
 	{
 		"ivec4", /* name */
@@ -951,8 +954,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{0}, {1979209158, -791559088, -992849733, -59981678}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{1979209158, -791559088, -992849733, -59981678}}
 	},
 	{
 		"ivec4[2]", /* name */
@@ -969,9 +972,9 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		false, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0}, {-764612129, 395402837, -1260359913, 936205122,
-		     -1510453781, -707590649, -760434930, -1756396083}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{-764612129, 395402837, -1260359913, 936205122,
+		     -1510453781, -707590649, -760434930, -1756396083}}
 	},
 	{
 		"ivec4[2]-no-subscript", /* name */
@@ -988,9 +991,9 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0}, {-764612129, 395402837, -1260359913, 936205122,
-		     -1510453781, -707590649, -760434930, -1756396083}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{-764612129, 395402837, -1260359913, 936205122,
+		     -1510453781, -707590649, -760434930, -1756396083}}
 	},
 	{
 		"uint", /* name */
@@ -1006,8 +1009,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		1, /* num_elements, expected_float, expected_int */
-		{0}, {2230472931u}
+		{1}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{2230472931u}}
 	},
 	{
 		"uint[2]", /* name */
@@ -1024,8 +1027,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		false, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{0}, {4073369952u, 1026348970u}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{4073369952u, 1026348970u}}
 	},
 	{
 		"uint[2]-no-subscript", /* name */
@@ -1042,8 +1045,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{0}, {4073369952u, 1026348970u}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{4073369952u, 1026348970u}}
 	},
 	{
 		"uvec2", /* name */
@@ -1059,8 +1062,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		2, /* num_elements, expected_float, expected_int */
-		{0}, {1214092884u, 3587337147u}
+		{2}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{1214092884u, 3587337147u}}
 	},
 	{
 		"uvec2[2]", /* name */
@@ -1077,8 +1080,8 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		false, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{0}, {1011258288u, 684916166u, 381807053u, 3306523233u}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{1011258288u, 684916166u, 381807053u, 3306523233u}}
 	},
 	{
 		"uvec2[2]-no-subscript", /* name */
@@ -1095,8 +1098,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{0}, {1011258288u, 684916166u, 381807053u, 3306523233u}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{1011258288u, 684916166u, 381807053u, 3306523233u}}
 	},
 	{
 		"uvec3", /* name */
@@ -1112,8 +1115,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		3, /* num_elements, expected_float, expected_int */
-		{0}, {1076370307u, 1186562996u, 3616039281u}
+		{3}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{1076370307u, 1186562996u, 3616039281u}}
 	},
 	{
 		"uvec3[2]", /* name */
@@ -1130,9 +1133,9 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		false, /* is_floating_point */
-		6, /* num_elements, expected_float, expected_int */
-		{0}, {2984731006u, 2324137892u, 876349448u,
-		     2493082028u, 1481747175u, 1530233730u}
+		{6}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{2984731006u, 2324137892u, 876349448u,
+		     2493082028u, 1481747175u, 1530233730u}}
 	},
 	{
 		"uvec3[2]-no-subscript", /* name */
@@ -1149,9 +1152,9 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		6, /* num_elements, expected_float, expected_int */
-		{0}, {2984731006u, 2324137892u, 876349448u,
-		     2493082028u, 1481747175u, 1530233730u}
+		{6}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{2984731006u, 2324137892u, 876349448u,
+		     2493082028u, 1481747175u, 1530233730u}}
 	},
 	{
 		"uvec4", /* name */
@@ -1167,8 +1170,8 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		4, /* num_elements, expected_float, expected_int */
-		{0}, {3046379279u, 3265138790u, 4109383147u, 2654056480u}
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{3046379279u, 3265138790u, 4109383147u, 2654056480u}}
 	},
 	{
 		"uvec4[2]", /* name */
@@ -1185,9 +1188,9 @@ struct test_desc {
 		{"r[0]", "r[1]"},
 
 		false, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0}, {2563680931u, 754130007u, 230209823u, 707580188u,
-		     3015681429u, 3850948302u, 2224673498u, 2376088107u}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{2563680931u, 754130007u, 230209823u, 707580188u,
+		     3015681429u, 3850948302u, 2224673498u, 2376088107u}}
 	},
 	{
 		"uvec4[2]-no-subscript", /* name */
@@ -1204,25 +1207,241 @@ struct test_desc {
 		{"r"},
 
 		false, /* is_floating_point */
-		8, /* num_elements, expected_float, expected_int */
-		{0}, {2563680931u, 754130007u, 230209823u, 707580188u,
-		     3015681429u, 3850948302u, 2224673498u, 2376088107u}
+		{8}, /* num_elements, expected_float, expected_int */
+		{{0}}, {{2563680931u, 754130007u, 230209823u, 707580188u,
+		     3015681429u, 3850948302u, 2224673498u, 2376088107u}}
+	},
+	{
+		"gl_NextBuffer-1", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		3, /* num_varyings, varyings */
+		{"r[0]", "gl_NextBuffer", "r[1]"},
+
+		true, /* is_floating_point */
+		{1, 1}, /* num_elements, expected_float, expected_int */
+		{{0.4}, {0.5}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_NextBuffer-2", /* name */
+
+		"#version 120\n" /* vs */
+		"varying vec2 a;"
+		"varying vec3 b;"
+		"varying float c;"
+		"varying vec3 d;"
+		"varying vec4 e;"
+		"varying vec3 f;"
+		"varying vec4 g, h;"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  a = vec2(0.4, 0.5);"
+		"  b = vec3(2.0, 3.0, 4.0);"
+		"  c = 0.011;"
+		"  d = vec3(0.35, 0.98, 0.59);"
+		"  e = vec4(5.4, 34.4, 2.3, 9.6);"
+		"  f = vec3(4.3, 6.2, 9.4);"
+		"  g = vec4(3.4, 9.6, 3.7, 9.3);"
+		"  h = vec4(8.1, 3.9, 3.6, 6.6);"
+		"}",
+
+		11, /* num_varyings, varyings */
+		{"a", "b", "gl_NextBuffer", "c", "d", "gl_NextBuffer", "e", "gl_NextBuffer", "f", "g", "h"},
+
+		true, /* is_floating_point */
+		{5, 4, 4, 11}, /* num_elements, expected_float, expected_int */
+		{{0.4, 0.5, 2.0, 3.0, 4.0}, {0.011, 0.35, 0.98, 0.59}, {5.4, 34.4, 2.3, 9.6},
+		 {4.3, 6.2, 9.4, 3.4, 9.6, 3.7, 9.3, 8.1, 3.9, 3.6, 6.6}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_SkipComponents1-1", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		2, /* num_varyings, varyings */
+		{"r[0]", "gl_SkipComponents1"},
+
+		true, /* is_floating_point */
+		{2}, /* num_elements, expected_float, expected_int */
+		{{0.4, DEFAULT_VALUE}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_SkipComponents1-2", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		2, /* num_varyings, varyings */
+		{"gl_SkipComponents1", "r[1]"},
+
+		true, /* is_floating_point */
+		{2}, /* num_elements, expected_float, expected_int */
+		{{DEFAULT_VALUE, 0.5}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_SkipComponents1-3", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		3, /* num_varyings, varyings */
+		{"r[0]", "gl_SkipComponents1", "r[1]"},
+
+		true, /* is_floating_point */
+		{3}, /* num_elements, expected_float, expected_int */
+		{{0.4, DEFAULT_VALUE, 0.5}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_SkipComponents2", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		3, /* num_varyings, varyings */
+		{"r[0]", "gl_SkipComponents2", "r[1]"},
+
+		true, /* is_floating_point */
+		{4}, /* num_elements, expected_float, expected_int */
+		{{0.4, DEFAULT_VALUE, DEFAULT_VALUE, 0.5}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_SkipComponents3", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		3, /* num_varyings, varyings */
+		{"r[0]", "gl_SkipComponents3", "r[1]"},
+
+		true, /* is_floating_point */
+		{5}, /* num_elements, expected_float, expected_int */
+		{{0.4, DEFAULT_VALUE, DEFAULT_VALUE, DEFAULT_VALUE, 0.5}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_SkipComponents4", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		3, /* num_varyings, varyings */
+		{"r[0]", "gl_SkipComponents4", "r[1]"},
+
+		true, /* is_floating_point */
+		{6}, /* num_elements, expected_float, expected_int */
+		{{0.4, DEFAULT_VALUE, DEFAULT_VALUE, DEFAULT_VALUE, DEFAULT_VALUE, 0.5}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_NextBuffer-gl_SkipComponents1-gl_NextBuffer", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		5, /* num_varyings, varyings */
+		{"r[0]", "gl_NextBuffer", "gl_SkipComponents1", "gl_NextBuffer", "r[1]"},
+
+		true, /* is_floating_point */
+		{1, 1, 1}, /* num_elements, expected_float, expected_int */
+		{{0.4}, {DEFAULT_VALUE}, {0.5}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_NextBuffer-gl_NextBuffer", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		4, /* num_varyings, varyings */
+		{"r[0]", "gl_NextBuffer", "gl_NextBuffer", "r[1]"},
+
+		true, /* is_floating_point */
+		{1, 1, 1}, /* num_elements, expected_float, expected_int */
+		{{0.4}, {DEFAULT_VALUE}, {0.5}}, {{0}},
+		true /* is transform_feedback3 */
+	},
+	{
+		"gl_SkipComponents1234", /* name */
+
+		"#version 120\n" /* vs */
+		"varying float r[2];"
+		"void main() {"
+		"  gl_Position = ftransform();"
+		"  r = float[2](0.4, 0.5);"
+		"}",
+
+		6, /* num_varyings, varyings */
+		{"r[0]", "gl_SkipComponents1", "gl_SkipComponents2", "gl_SkipComponents3", "gl_SkipComponents4", "r[1]"},
+
+		true, /* is_floating_point */
+		{12}, /* num_elements, expected_float, expected_int */
+		{{0.4,
+		  DEFAULT_VALUE,
+		  DEFAULT_VALUE, DEFAULT_VALUE,
+		  DEFAULT_VALUE, DEFAULT_VALUE, DEFAULT_VALUE,
+		  DEFAULT_VALUE, DEFAULT_VALUE, DEFAULT_VALUE, DEFAULT_VALUE,
+		  0.5}}, {{0}},
+		true /* is transform_feedback3 */
 	},
 
 	{NULL}
 };
 struct test_desc *test;
 
-GLuint buf;
+GLuint buf[4];
 GLuint prog;
 
 #define NUM_VERTICES 3
-#define DEFAULT_VALUE 0.123456
 
 void piglit_init(int argc, char **argv)
 {
 	GLuint vs;
-	unsigned i;
+	unsigned i,j;
 	int maxcomps;
 	float *data;
 
@@ -1255,10 +1474,14 @@ test_ready:
 	piglit_require_transform_feedback();
 	if (!test->is_floating_point)
 		piglit_require_GLSL_version(130);
+	if (test->is_transform_feedback3)
+		piglit_require_extension("GL_ARB_transform_feedback3");
 
 	glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, &maxcomps);
-	if (maxcomps < test->num_elements) {
-		piglit_report_result(PIGLIT_SKIP);
+	for (i = 0; i < 4; i++) {
+		if (maxcomps < test->num_elements[i]) {
+			piglit_report_result(PIGLIT_SKIP);
+		}
 	}
 
 	/* Create shaders. */
@@ -1274,28 +1497,42 @@ test_ready:
 		piglit_report_result(PIGLIT_FAIL);
 	}
 
-	/* Set up the transform feedback buffer. */
-	data = malloc(test->num_elements*NUM_VERTICES*sizeof(float));
-	for (i = 0; i < test->num_elements*NUM_VERTICES; i++) {
-		data[i] = DEFAULT_VALUE;
-	}
+	glGenBuffers(4, buf);
 
-	glGenBuffers(1, &buf);
-	glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, buf);
-	glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER_EXT,
-		     test->num_elements*NUM_VERTICES*sizeof(float),
-		     data, GL_STREAM_READ);
+	for (j = 0; j < 4; j++) {
+		if (!test->num_elements[j]) {
+			continue;
+		}
+		if (test->is_transform_feedback3) {
+			GLint maxbufs;
+			glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_BUFFERS, &maxbufs);
+			if (j >= maxbufs) {
+				piglit_report_result(PIGLIT_SKIP);
+			}
+		}
 
-	assert(glGetError() == 0);
+		/* Set up the transform feedback buffer. */
+		data = malloc(test->num_elements[j]*NUM_VERTICES*sizeof(float));
+		for (i = 0; i < test->num_elements[j]*NUM_VERTICES; i++) {
+			data[i] = DEFAULT_VALUE;
+		}
 
-	piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, buf);
+		glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, buf[j]);
+		glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER_EXT,
+			     test->num_elements[j]*NUM_VERTICES*sizeof(float),
+			     data, GL_STREAM_READ);
 
-	assert(glGetError() == 0);
+		assert(glGetError() == 0);
+
+		piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, j, buf[j]);
+
+		assert(glGetError() == 0);
+
+		free(data);
+	}
 
 	glClearColor(0.2, 0.2, 0.2, 1.0);
 	glEnableClientState(GL_VERTEX_ARRAY);
-
-	free(data);
 }
 
 enum piglit_result piglit_display(void)
@@ -1304,7 +1541,7 @@ enum piglit_result piglit_display(void)
 	void *ptr;
 	float *ptr_float;
 	GLint *ptr_int;
-	unsigned i;
+	unsigned i,j;
 	static const float verts[NUM_VERTICES*2] = {
 		10, 10,
 		10, 20,
@@ -1324,31 +1561,38 @@ enum piglit_result piglit_display(void)
 
 	assert(glGetError() == 0);
 
-	ptr = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, GL_READ_ONLY);
-	ptr_float = ptr;
-	ptr_int = ptr;
-	for (i = 0; i < test->num_elements*NUM_VERTICES; i++) {
-		if (test->is_floating_point) {
-			float value = test->expected_float[i % test->num_elements];
-
-			if (fabs(ptr_float[i] - value) > 0.01) {
-				printf("Buffer[%i]: %f,  Expected: %f\n", i,
-				       ptr_float[i], value);
-				pass = GL_FALSE;
-			}
-		} else {
-			GLint value = test->expected_int[i % test->num_elements];
+	for (j = 0; j < 4; j++) {
+		if (!test->num_elements[j]) {
+			continue;
+		}
 
-			if (ptr_int[i] != value) {
-				printf("Buffer[%i]: %i,  Expected: %i\n", i,
-				       ptr_int[i], value);
-				pass = GL_FALSE;
+		glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, buf[j]);
+		ptr = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, GL_READ_ONLY);
+		ptr_float = ptr;
+		ptr_int = ptr;
+
+		for (i = 0; i < test->num_elements[j]*NUM_VERTICES; i++) {
+			if (test->is_floating_point) {
+				float value = test->expected_float[j][i % test->num_elements[j]];
+
+				if (fabs(ptr_float[i] - value) > 0.01) {
+					printf("Buffer[%i][%i]: %f,  Expected: %f\n", j, i,
+					       ptr_float[i], value);
+					pass = GL_FALSE;
+				}
+			} else {
+				GLint value = test->expected_int[j][i % test->num_elements[j]];
+
+				if (ptr_int[i] != value) {
+					printf("Buffer[%i][%i]: %i,  Expected: %i\n", j, i,
+					       ptr_int[i], value);
+					pass = GL_FALSE;
+				}
 			}
 		}
+		glUnmapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT);
+		assert(glGetError() == 0);
 	}
-	glUnmapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT);
-
-	assert(glGetError() == 0);
 
 	piglit_present_results();
 
-- 
1.7.9.5



More information about the Piglit mailing list