[Piglit] [PATCH] arb_texture_barrier: Fix draw_passes value check.

Vinson Lee vlee at freedesktop.org
Wed Jul 13 23:12:49 UTC 2016


Fix copy-paste error defect reported by Coverity.

CID: 1363386
Fixes: 8cb75a1bc1cb ("arb_texture_barrier: add an arb_texture_barrier test")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/spec/arb_texture_barrier/blending-in-shader-arb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/arb_texture_barrier/blending-in-shader-arb.c b/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
index e438f560cee2..2b10791679f6 100644
--- a/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
+++ b/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
@@ -510,7 +510,7 @@ parse_args(int argc, char **argv)
         }
 
         draw_passes = atoi(argv[5]);
-        if (granularity < 1 || draw_passes > 10) {
+        if (draw_passes < 1 || draw_passes > 10) {
                 fprintf(stderr, "Wrong value for draw_passes: %s\n", argv[5]);
                 print_usage();
                 piglit_report_result(PIGLIT_FAIL);
-- 
2.7.4



More information about the Piglit mailing list