diff --git a/src/glamor_trapezoid.c b/src/glamor_trapezoid.c index 57a178c..f318f4b 100644 --- a/src/glamor_trapezoid.c +++ b/src/glamor_trapezoid.c @@ -855,7 +855,7 @@ _glamor_trapezoids_with_shader(CARD8 op, mclip_rect = 1; ptrap = traps; traps_count = ntriangle_per_loop / 4; - traps_not_completed = ntrap - traps_count; + traps_not_completed = nclip_rect * ntrap - traps_count; } else { traps_count = ntrap; ptrap = traps;