Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2802dae1 authored by Jason Sams's avatar Jason Sams
Browse files

Fix bug with 1D arrays and threading.

Some elements got launched multiple times.

Change-Id: Icb257019df591a5d9525867c8ef8d18ef7d4cde5
parent 38b78b1b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -267,12 +267,12 @@ static void wc_x(void *usr, uint32_t idx) {
            return;
        }

        //LOGE("usr idx %i, x %i,%i  y %i,%i", idx, mtls->xStart, mtls->xEnd, yStart, yEnd);
        //LOGE("usr slice %i idx %i, x %i,%i", slice, idx, xStart, xEnd);
        //LOGE("usr ptr in %p,  out %p", mtls->ptrIn, mtls->ptrOut);

        p.out = mtls->ptrOut + (mtls->eStrideOut * xStart);
        p.in = mtls->ptrIn + (mtls->eStrideIn * xStart);
        fn(&mtls->script->mHal.info.root, &p, mtls->xStart, mtls->xEnd,
           mtls->eStrideIn, mtls->eStrideOut);
        fn(&mtls->script->mHal.info.root, &p, xStart, xEnd, mtls->eStrideIn, mtls->eStrideOut);
    }
}