[Piglit] [PATCH 1/2] draw-vertices-2101010: add half-scale color tests
Chris Forbes
chrisf at ijw.co.nz
Mon Nov 19 19:51:01 PST 2012
Oops -- this patch will be replaced. Still has mad magic indices
everywhere, to be replaced with enum values based on Eric's feedback last
time. 2/2 still stands.
On Tue, Nov 20, 2012 at 4:45 PM, Chris Forbes <chrisf at ijw.co.nz> wrote:
> Picks up the driver not bothering to normalize attribute values.
> This was broken in an early version of my i965 support for this
> extension.
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
> .../arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c | 10
> +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git
> a/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
> b/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
> index a4abf35..0b17415 100644
> --- a/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
> +++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
> @@ -98,10 +98,14 @@ static void test_packed_int_color_vertices(float x1,
> float y1, float x2, float y
> v[1] = iconv(x1, y2, 0, 1);
> v[2] = iconv(x2, y1, 0, 1);
>
> - if (index == 0 || index == 2) {
> + if (index == 0 || index == 2 || index == 5) {
> c[0] = iconv(511, 0, 0, 0);
> c[1] = iconv(511, 0, 0, 0);
> c[2] = iconv(511, 0, 0, 0);
> + } else if (index == 4) {
> + c[0] = iconv(254, 0, 0, 0);
> + c[1] = iconv(254, 0, 0, 0);
> + c[2] = iconv(254, 0, 0, 0);
> } else {
> c[0] = conv(1023, 0, 0, 0);
> c[1] = conv(1023, 0, 0, 0);
> @@ -116,6 +120,8 @@ static void test_packed_int_color_vertices(float x1,
> float y1, float x2, float y
> case 1: vbo = vboColorPointer(4, GL_UNSIGNED_INT_2_10_10_10_REV,
> 4, c, sizeof(c), 0); break;
> case 2: vbo = vboColorPointer(GL_BGRA, GL_INT_2_10_10_10_REV, 4,
> c, sizeof(c), 0); break;
> case 3: vbo = vboColorPointer(GL_BGRA,
> GL_UNSIGNED_INT_2_10_10_10_REV, 4, c, sizeof(c), 0); break;
> + case 4: vbo = vboColorPointer(4, GL_INT_2_10_10_10_REV, 4, c,
> sizeof(c), 0); break;
> + case 5: vbo = vboColorPointer(4, GL_UNSIGNED_INT_2_10_10_10_REV,
> 4, c, sizeof(c), 0); break;
> }
>
> glDrawArrays(GL_TRIANGLES, 0, 3);
> @@ -197,6 +203,8 @@ struct test tests[] = {
> {test_packed_int_color_vertices, 1, {1, 0, 0, 0}, "Unsigned Int Color
> - 2/10/10/10"},
> {test_packed_int_color_vertices, 2, {0, 0, 1, 0.333}, "Int BGRA Color
> - 2/10/10/10"},
> {test_packed_int_color_vertices, 3, {0, 0, 1, 0}, "Unsigned Int BGRA
> Color - 2/10/10/10"},
> + {test_packed_int_color_vertices, 4, {0.5f, 0, 0, 0}, "Half-scale Int
> Color - 2/10/10/10"},
> + {test_packed_int_color_vertices, 5, {0.5f, 0, 0, 0}, "Half-scale
> Unsigned Int Color - 2/10/10/10"},
>
> {test_int_vertices_abi, 0, {1, 0, 0, 1}, "Int 2/10/10/10 - test ABI"
> },
> {test_int_vertices_abi, 1, {1, 0, 0, 1}, "Unsigned 2/10/10/10 - test
> ABI" },
> --
> 1.8.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20121120/2d94286f/attachment-0001.html>
More information about the Piglit
mailing list