Ilia Mirkin <imir...@alum.mit.edu> writes:

> On Thu, Apr 26, 2018 at 1:21 PM, Eric Anholt <e...@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 <imir...@alum.mit.edu>

I was going for "as close as possible to the switch statement that turns
the magic numbers into BGRA usage"

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to