I do not observe the artifacts at same smear step (nor any other) with VM [CoInterpreterPrimitives VMMaker.oscog-eem.2266] 5.0.201708312323 That's just 222 commits to bissect... Le ven. 21 févr. 2020 à 23:00, Nicolas Cellier <[hidden email]> a écrit :
|
We are overwriting upper row because taking hdir=-1 because of overlap The problem is not that we write too far, but that we pick too early (on previous row), and it is related to ??? preload!! endBits := (sx + bbW - 1 bitAnd: pixPerM1) + 1 First error above: checkSourceOverlap has already done that: sx := sx + bbW - 1. So it must be: endBits := (sx bitAnd: pixPerM1) + 1 Then we build mask1: m1 := destMSB = (hDir > 0) ifTrue: [AllOnes >> (32 - (startBits * destDepth))] ifFalse: [AllOnes << (32 - (startBits * destDepth)) bitAnd: AllOnes]. Second error above: if we have reversed direction (hDir = -1), then we must build mask2: destMSB ifTrue: [mask2 := AllOnes << (32 - (endBits * destDepth)) bitAnd: AllOnes] ifFalse: [mask2 := AllOnes >> (32 - (endBits * destDepth))]. Replace mask2 by m1 and endBits by startBits (because startBits contains endBits if hDir=-1) And you see that the conditions destMSB is reversed... Last thing: on 64bits, mask1 and mask2 have been declared int64... But we only want 32 bits mask. That is why I have protected with the bitAnd: AllOnes (and thus removed the cCode:inSmalltalk: simulation guard) Le ven. 21 févr. 2020 à 23:40, Nicolas Cellier <[hidden email]> a écrit :
|
On Sat, Feb 22, 2020 at 9:30 AM Nicolas Cellier <[hidden email]> wrote:
Thanks a lot for fixing this, Nicolas! Well done! I was able to reproduce the bug and fix it with a port of your patch [1] in GraalSqueak. Fabio
|
Free forum by Nabble | Edit this page |