X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fstate_trackers%2Fvega%2Farc.c;h=2d1234087024194fd3ca1459a30cb6d62f5a6bb9;hb=e4c54d404959aa1bce26caa313c0a47e65ff211a;hp=e74c7f033456fbc8a38e073647509aa1cf153219;hpb=28471cfa970702128d822c2ecbb1703eedbca245;p=mesa.git diff --git a/src/gallium/state_trackers/vega/arc.c b/src/gallium/state_trackers/vega/arc.c index e74c7f03345..2d123408702 100644 --- a/src/gallium/state_trackers/vega/arc.c +++ b/src/gallium/state_trackers/vega/arc.c @@ -537,8 +537,9 @@ static INLINE int num_beziers_needed(struct arc *arc) double d_eta = (max_eta - min_eta) / n; if (d_eta <= 0.5 * M_PI) { double eta_b = min_eta; + int i; found = VG_TRUE; - for (int i = 0; found && (i < n); ++i) { + for (i = 0; found && (i < n); ++i) { double etaA = eta_b; eta_b += d_eta; found = (estimate_error(arc, etaA, eta_b) <= threshold); @@ -554,6 +555,7 @@ static void arc_to_beziers(struct arc *arc, struct arc_cb cb, struct matrix *matrix) { + int i; int n = 1; double d_eta, eta_b, cos_eta_b, sin_eta_b, a_cos_eta_b, b_sin_eta_b, a_sin_eta_b, @@ -607,7 +609,7 @@ static void arc_to_beziers(struct arc *arc, t = tan(0.5 * d_eta); alpha = sin(d_eta) * (sqrt(4 + 3 * t * t) - 1) / 3; - for (int i = 0; i < n; ++i) { + for (i = 0; i < n; ++i) { struct bezier bezier; double xA = x_b; double yA = y_b;