[Piglit] [PATCH 2/2] Transform feedback: Add tests of arrays without subscripts.
Paul Berry
stereotype441 at gmail.com
Tue Jan 3 22:31:44 PST 2012
This patch verifies that transform feedback can be used on whole
arrays (without specifying an array subscript) as well as subscripted
arrays.
Verified on the nVidia proprietary Linux driver.
---
tests/all.tests | 12 +-
.../spec/ext_transform_feedback/builtin-varyings.c | 160 ++++++++
tests/spec/ext_transform_feedback/output-type.c | 396 ++++++++++++++++++++
3 files changed, 566 insertions(+), 2 deletions(-)
diff --git a/tests/all.tests b/tests/all.tests
index e70baf8..f07a40a 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -1412,7 +1412,15 @@ for mode in ['interleaved_ok_base', 'interleaved_ok_range',
'ext_transform_feedback-{0} -auto'.format(test_name))
for varying in ['gl_Color', 'gl_SecondaryColor', 'gl_TexCoord',
'gl_FogFragCoord', 'gl_Position', 'gl_PointSize',
- 'gl_ClipVertex', 'gl_ClipDistance']:
+ 'gl_ClipVertex', 'gl_ClipDistance',
+ 'gl_ClipDistance[1]-no-subscript',
+ 'gl_ClipDistance[2]-no-subscript',
+ 'gl_ClipDistance[3]-no-subscript',
+ 'gl_ClipDistance[4]-no-subscript',
+ 'gl_ClipDistance[5]-no-subscript',
+ 'gl_ClipDistance[6]-no-subscript',
+ 'gl_ClipDistance[7]-no-subscript',
+ 'gl_ClipDistance[8]-no-subscript']:
test_name = 'builtin-varyings {0}'.format(varying)
ext_transform_feedback[test_name] = PlainExecTest(
'ext_transform_feedback-{0} -auto'.format(test_name))
@@ -1487,7 +1495,7 @@ for output_type in ['float', 'vec2', 'vec3', 'vec4', 'mat2', 'mat2x3',
'mat2x4', 'mat3x2', 'mat3', 'mat3x4', 'mat4x2', 'mat4x3',
'mat4', 'int', 'ivec2', 'ivec3', 'ivec4', 'uint', 'uvec2',
'uvec3', 'uvec4']:
- for suffix in ['', '[2]']:
+ for suffix in ['', '[2]', '[2]-no-subscript']:
test_name = 'output-type {0}{1}'.format(output_type, suffix)
ext_transform_feedback[test_name] = PlainExecTest(
'ext_transform_feedback-{0} -auto'.format(test_name))
diff --git a/tests/spec/ext_transform_feedback/builtin-varyings.c b/tests/spec/ext_transform_feedback/builtin-varyings.c
index 9ec1a34..0831727 100644
--- a/tests/spec/ext_transform_feedback/builtin-varyings.c
+++ b/tests/spec/ext_transform_feedback/builtin-varyings.c
@@ -211,6 +211,166 @@ struct test_desc {
8 /* expected_num_output_components */
},
+ {
+ "gl_ClipDistance[1]-no-subscript", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_ClipDistance[1];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 1; ++i)\n"
+ " gl_ClipDistance[i] = (float(i) + 1.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 1, /* num_varyings */
+ {"gl_ClipDistance"}, /* varyings */
+
+ 1 /* expected_num_output_components */
+ },
+ {
+ "gl_ClipDistance[2]-no-subscript", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_ClipDistance[2];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 2; ++i)\n"
+ " gl_ClipDistance[i] = (float(i) + 2.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 1, /* num_varyings */
+ {"gl_ClipDistance"}, /* varyings */
+
+ 2 /* expected_num_output_components */
+ },
+ {
+ "gl_ClipDistance[3]-no-subscript", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_ClipDistance[3];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 3; ++i)\n"
+ " gl_ClipDistance[i] = (float(i) + 3.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 1, /* num_varyings */
+ {"gl_ClipDistance"}, /* varyings */
+
+ 3 /* expected_num_output_components */
+ },
+ {
+ "gl_ClipDistance[4]-no-subscript", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_ClipDistance[4];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 4; ++i)\n"
+ " gl_ClipDistance[i] = (float(i) + 4.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 1, /* num_varyings */
+ {"gl_ClipDistance"}, /* varyings */
+
+ 4 /* expected_num_output_components */
+ },
+ {
+ "gl_ClipDistance[5]-no-subscript", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_ClipDistance[5];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 5; ++i)\n"
+ " gl_ClipDistance[i] = (float(i) + 5.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 1, /* num_varyings */
+ {"gl_ClipDistance"}, /* varyings */
+
+ 5 /* expected_num_output_components */
+ },
+ {
+ "gl_ClipDistance[6]-no-subscript", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_ClipDistance[6];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 6; ++i)\n"
+ " gl_ClipDistance[i] = (float(i) + 6.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 1, /* num_varyings */
+ {"gl_ClipDistance"}, /* varyings */
+
+ 6 /* expected_num_output_components */
+ },
+ {
+ "gl_ClipDistance[7]-no-subscript", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_ClipDistance[7];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 7; ++i)\n"
+ " gl_ClipDistance[i] = (float(i) + 7.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 1, /* num_varyings */
+ {"gl_ClipDistance"}, /* varyings */
+
+ 7 /* expected_num_output_components */
+ },
+ {
+ "gl_ClipDistance[8]-no-subscript", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_ClipDistance[8];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 8; ++i)\n"
+ " gl_ClipDistance[i] = (float(i) + 8.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 1, /* num_varyings */
+ {"gl_ClipDistance"}, /* varyings */
+
+ 8 /* expected_num_output_components */
+ },
};
const struct test_desc *test_to_run;
diff --git a/tests/spec/ext_transform_feedback/output-type.c b/tests/spec/ext_transform_feedback/output-type.c
index 48ddfc7..ec4753a 100644
--- a/tests/spec/ext_transform_feedback/output-type.c
+++ b/tests/spec/ext_transform_feedback/output-type.c
@@ -79,6 +79,23 @@ struct test_desc {
{666, 0.123}, {}
},
{
+ "float[2]-no-subscript", /* name */
+
+ "#version 120\n"
+ "varying float r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = float[2](666.0, 0.123);"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ true, /* is_floating_point */
+ 2, /* num_elements, expected_float, expected_int */
+ {666, 0.123}, {}
+ },
+ {
"vec2", /* name */
"#version 110\n"
@@ -113,6 +130,23 @@ struct test_desc {
{666, 999, -1.5, -20.0}, {}
},
{
+ "vec2[2]-no-subscript", /* name */
+
+ "#version 120\n"
+ "varying vec2 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = vec2[2](vec2(666.0, 999.0), vec2(-1.5, -20.0));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ true, /* is_floating_point */
+ 4, /* num_elements, expected_float, expected_int */
+ {666, 999, -1.5, -20.0}, {}
+ },
+ {
"vec3", /* name */
"#version 110\n"
@@ -147,6 +181,23 @@ struct test_desc {
{666, 999, -2, 0.4, 1.4, 3.5}, {}
},
{
+ "vec3[2]-no-subscript", /* name */
+
+ "#version 120\n"
+ "varying vec3 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = vec3[2](vec3(666.0, 999.0, -2.0), vec3(0.4, 1.4, 3.5));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ true, /* is_floating_point */
+ 6, /* num_elements, expected_float, expected_int */
+ {666, 999, -2, 0.4, 1.4, 3.5}, {}
+ },
+ {
"vec4", /* name */
"#version 110\n"
@@ -181,6 +232,23 @@ struct test_desc {
{0.666, 666, 999, -2, 0.5, -0.4, 30.0, 40.0}, {}
},
{
+ "vec4[2]-no-subscript", /* name */
+
+ "#version 120\n"
+ "varying vec4 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = vec4[2](vec4(0.666, 666.0, 999.0, -2.0), vec4(0.5, -0.4, 30.0, 40.0));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat2", /* name */
"#version 110\n"
@@ -216,6 +284,24 @@ struct test_desc {
{0.666, 666, 999, -2, 0.34, 0.65, 0.14, -0.97}, {}
},
{
+ "mat2[2]-no-subscript", /* name */
+
+ "#version 120\n"
+ "varying mat2 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat2[2](mat2(0.666, 666.0, 999.0, -2.0),"
+ " mat2(0.34, 0.65, 0.14, -0.97));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat2x3", /* name */
"#version 120\n"
@@ -251,6 +337,24 @@ struct test_desc {
{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 */
+
+ "#version 120\n"
+ "varying mat2x3 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat2x3[2](mat2x3(0.666, 666.0, 999.0, -2.0, 0.5, -0.4),"
+ " mat2x3(0.34, 0.12, -10.0, 30.1, 5.3, 9.8));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat2x4", /* name */
"#version 120\n"
@@ -286,6 +390,24 @@ struct test_desc {
{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 */
+
+ "#version 120\n"
+ "varying mat2x4 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat2x4[2](mat2x4(0.666, 666.0, 999.0, -2.0, 0.5, -0.4, 30.0, 40.0),"
+ " mat2x4(0.12, 0.24, 0.34, 0.56, 0.67, 0.78, 0.89, 0.04));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat3x2", /* name */
"#version 120\n"
@@ -322,6 +444,24 @@ struct test_desc {
{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 */
+
+ "#version 120\n"
+ "varying mat3x2 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat3x2[2](mat3x2(0.666, 666.0, 999.0, -2.0, 0.2, 5.0),"
+ " mat3x2(0.98, 0.87, 0.76, 0.65, 0.54, 0.43));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat3", /* name */
"#version 110\n"
@@ -362,6 +502,27 @@ struct test_desc {
20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0}, {}
},
{
+ "mat3[2]-no-subscript", /* name */
+
+ "#version 120\n"
+ "varying mat3 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat3[2](mat3(0.666, 666.0, 999.0,"
+ " -2.0, 0.2, 5.0,"
+ " 3.0, 0.3, -10.0),"
+ " mat3(20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6, 8.0));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat3x4", /* name */
"#version 120\n"
@@ -403,6 +564,27 @@ struct test_desc {
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 */
+
+ "#version 120\n"
+ "varying mat3x4 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat3x4[2](mat3x4(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(20.0, 10.0, 5.0, 90.0, -4.0, 3.4,"
+ " -2.3, -8.6, 8.0, 0.4, -4.1, -5.9));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat4x2", /* name */
"#version 120\n"
@@ -439,6 +621,25 @@ struct test_desc {
20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6}, {}
},
{
+ "mat4x2[2]-no-subscript", /* name */
+
+ "#version 120\n"
+ "varying mat4x2 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat4x2[2](mat4x2(0.666, 666.0, 999.0, -2.0, 0.5, -0.4, 30.0, 40.0),"
+ " mat4x2(20.0, 10.0, 5.0, 90.0, -4.0, 3.4, -2.3, -8.6));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat4x3", /* name */
"#version 120\n"
@@ -480,6 +681,28 @@ struct test_desc {
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 */
+
+ "#version 120\n"
+ "varying mat4x3 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat4x3[2](mat4x3(0.666, 666.0, 999.0, -2.0,"
+ " 0.5, -0.4, 30.0, 40.0,"
+ " 0.3, 0.2, 0.1, 0.4),"
+ " mat4x3(20.0, 10.0, 5.0, 90.0, -4.0, 3.4,"
+ " -2.3, -8.6, 8.0, 0.4, -4.1, -5.9));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"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}, {}
+ },
+ {
"mat4", /* name */
"#version 110\n"
@@ -528,6 +751,31 @@ struct test_desc {
8.0, 0.4, -4.1, -5.9, -10.0, 0.4, -4.1, -5.9}, {}
},
{
+ "mat4[2]-no-subscript", /* name */
+
+ "#version 120\n"
+ "varying mat4 r[2];" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = mat4[2](mat4(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),"
+ " mat4(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));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ true, /* is_floating_point */
+ 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}, {}
+ },
+ {
"int", /* name */
"#version 130\n"
@@ -563,6 +811,24 @@ struct test_desc {
{}, {-362245257, 2074398469}
},
{
+ "int[2]-no-subscript", /* name */
+
+ "#version 130\n"
+ "flat out int[2] r;" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = int[2](-362245257,"
+ " 2074398469);"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ false, /* is_floating_point */
+ 2, /* num_elements, expected_float, expected_int */
+ {}, {-362245257, 2074398469}
+ },
+ {
"ivec2", /* name */
"#version 130\n"
@@ -598,6 +864,24 @@ struct test_desc {
{}, {5703639, 654049542, 82927237, -1489678625}
},
{
+ "ivec2[2]-no-subscript", /* name */
+
+ "#version 130\n"
+ "flat out ivec2[2] r;" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = ivec2[2](ivec2(5703639, 654049542),"
+ " ivec2(82927237, -1489678625));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ false, /* is_floating_point */
+ 4, /* num_elements, expected_float, expected_int */
+ {}, {5703639, 654049542, 82927237, -1489678625}
+ },
+ {
"ivec3", /* name */
"#version 130\n"
@@ -634,6 +918,25 @@ struct test_desc {
-541769145, -896550370, -322088831}
},
{
+ "ivec3[2]-no-subscript", /* name */
+
+ "#version 130\n"
+ "flat out ivec3[2] r;" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = ivec3[2](ivec3(819762795, 292214138, 207695021),"
+ " ivec3(-541769145, -896550370, -322088831));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ false, /* is_floating_point */
+ 6, /* num_elements, expected_float, expected_int */
+ {}, {819762795, 292214138, 207695021,
+ -541769145, -896550370, -322088831}
+ },
+ {
"ivec4", /* name */
"#version 130\n"
@@ -670,6 +973,25 @@ struct test_desc {
-1510453781, -707590649, -760434930, -1756396083}
},
{
+ "ivec4[2]-no-subscript", /* name */
+
+ "#version 130\n"
+ "flat out ivec4[2] r;" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = ivec4[2](ivec4(-764612129, 395402837, -1260359913, 936205122),"
+ " ivec4(-1510453781, -707590649, -760434930, -1756396083));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ false, /* is_floating_point */
+ 8, /* num_elements, expected_float, expected_int */
+ {}, {-764612129, 395402837, -1260359913, 936205122,
+ -1510453781, -707590649, -760434930, -1756396083}
+ },
+ {
"uint", /* name */
"#version 130\n"
@@ -705,6 +1027,24 @@ struct test_desc {
{}, {4073369952u, 1026348970u}
},
{
+ "uint[2]-no-subscript", /* name */
+
+ "#version 130\n"
+ "flat out uint[2] r;" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = uint[2](4073369952u,"
+ " 1026348970u);"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ false, /* is_floating_point */
+ 2, /* num_elements, expected_float, expected_int */
+ {}, {4073369952u, 1026348970u}
+ },
+ {
"uvec2", /* name */
"#version 130\n"
@@ -740,6 +1080,24 @@ struct test_desc {
{}, {1011258288u, 684916166u, 381807053u, 3306523233u}
},
{
+ "uvec2[2]-no-subscript", /* name */
+
+ "#version 130\n"
+ "flat out uvec2[2] r;" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = uvec2[2](uvec2(1011258288u, 684916166u),"
+ " uvec2(381807053u, 3306523233u));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ false, /* is_floating_point */
+ 4, /* num_elements, expected_float, expected_int */
+ {}, {1011258288u, 684916166u, 381807053u, 3306523233u}
+ },
+ {
"uvec3", /* name */
"#version 130\n"
@@ -776,6 +1134,25 @@ struct test_desc {
2493082028u, 1481747175u, 1530233730u}
},
{
+ "uvec3[2]-no-subscript", /* name */
+
+ "#version 130\n"
+ "flat out uvec3[2] r;" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = uvec3[2](uvec3(2984731006u, 2324137892u, 876349448u),"
+ " uvec3(2493082028u, 1481747175u, 1530233730u));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ false, /* is_floating_point */
+ 6, /* num_elements, expected_float, expected_int */
+ {}, {2984731006u, 2324137892u, 876349448u,
+ 2493082028u, 1481747175u, 1530233730u}
+ },
+ {
"uvec4", /* name */
"#version 130\n"
@@ -811,6 +1188,25 @@ struct test_desc {
{}, {2563680931u, 754130007u, 230209823u, 707580188u,
3015681429u, 3850948302u, 2224673498u, 2376088107u}
},
+ {
+ "uvec4[2]-no-subscript", /* name */
+
+ "#version 130\n"
+ "flat out uvec4[2] r;" /* vs */
+ "void main() {"
+ " gl_Position = ftransform();"
+ " r = uvec4[2](uvec4(2563680931u, 754130007u, 230209823u, 707580188u),"
+ " uvec4(3015681429u, 3850948302u, 2224673498u, 2376088107u));"
+ "}",
+
+ 1, /* num_varyings, varyings */
+ {"r"},
+
+ false, /* is_floating_point */
+ 8, /* num_elements, expected_float, expected_int */
+ {}, {2563680931u, 754130007u, 230209823u, 707580188u,
+ 3015681429u, 3850948302u, 2224673498u, 2376088107u}
+ },
{NULL}
};
--
1.7.6.5
More information about the Piglit
mailing list