[Piglit] [PATCH] draw-pixels: fix KHR_no_error logic
Timothy Arceri
tarceri at itsqueeze.com
Fri Aug 25 04:08:01 UTC 2017
On 23/08/17 17:23, Samuel Pitoiset wrote:
>
>
> On 08/23/2017 06:11 AM, Timothy Arceri wrote:
>> ---
>>
>> This was my fault. The flaw was in my suggestion from the code
>> review.
>
> You probably need to use PIGLIT_HAS_ERRORS as well.
I don't think so. This skips testing draws with invalid types, the test
ran fine for me with this change.
>
>>
>> tests/general/draw-pixels.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/general/draw-pixels.c b/tests/general/draw-pixels.c
>> index 40b4c0b0f..333bb7f86 100644
>> --- a/tests/general/draw-pixels.c
>> +++ b/tests/general/draw-pixels.c
>> @@ -730,22 +730,24 @@ piglit_display(void)
>> glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
>> for (i = 0; i < ARRAY_SIZE(data_types); i++) {
>> for (k = 0; k < ARRAY_SIZE(pixel_ops); k++) {
>> for (j = 0; j < ARRAY_SIZE(pixel_formats); j++) {
>> format = pixel_formats[j];
>> type = data_types[i];
>> - if (!piglit_khr_no_error &&
>> - is_format_type_mismatch(format, type)) {
>> + if (is_format_type_mismatch(format, type)) {
>> + if (piglit_khr_no_error)
>> + continue;
>> +
>> glDrawPixels(piglit_width, piglit_height,
>> format, type, pixels);
>> /* Here GL_INVALID_OPERATION is an
>> * expected GL error
>> */
>> pass = piglit_check_gl_error(
>> GL_INVALID_OPERATION)
>> && pass;
>> continue;
>> }
>>
More information about the Piglit
mailing list