[Piglit] [PATCH] draw-pixels: fix KHR_no_error logic

Timothy Arceri tarceri at itsqueeze.com
Wed Aug 23 04:11:25 UTC 2017


---

 This was my fault. The flaw was in my suggestion from the code
 review.

 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;
 				}
-- 
2.13.4



More information about the Piglit mailing list