[Piglit] [PATCH] draw-vertices-2101010: Don't test BGRA if we don't have the ext.

Eric Anholt eric at anholt.net
Mon Apr 30 18:03:45 UTC 2018


Ilia Mirkin <imirkin at alum.mit.edu> writes:

> On Thu, Apr 26, 2018 at 1:21 PM, Eric Anholt <eric at anholt.net> wrote:
>> The 2101010 spec says to remove BGRA references if this extension
>> isn't present, so don't test them.
>> ---
>>  .../draw-vertices-2101010.c                   | 22 ++++++++++++++-----
>>  1 file changed, 17 insertions(+), 5 deletions(-)
>>
>> 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 5ce4c0655626..a672bb7d5520 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
>> @@ -89,7 +89,7 @@ static GLuint vboColorPointer(GLint size, GLenum type, GLsizei stride,
>>      return id;
>>  }
>>
>> -static void test_packed_int_color_vertices(float x1, float y1, float x2, float y2, int index)
>> +static bool test_packed_int_color_vertices(float x1, float y1, float x2, float y2, int index)
>>  {
>>      unsigned int v[3];
>>      unsigned int c[3];
>> @@ -111,6 +111,10 @@ static void test_packed_int_color_vertices(float x1, float y1, float x2, float y
>>
>>      glVertexPointer(4, GL_INT_2_10_10_10_REV, 4, v);
>>
>> +    if (index >= 2 &&
>> +       !piglit_is_extension_supported("GL_EXT_vertex_array_bgra"))
>> +           return false;
>
> Would it make sense to move this further towards the top of the function?
>
> Either way,
>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

I was going for "as close as possible to the switch statement that turns
the magic numbers into BGRA usage"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180430/3ede2947/attachment.sig>


More information about the Piglit mailing list