tim Rowledge uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-tpr.3018.mcz
==================== Summary ====================
Name: VMMaker.oscog-tpr.3018 Author: tpr Time: 2 August 2021, 7:11:46.43285 pm UUID: c57c2e71-7aca-4fc8-a32a-887b9393dd3a Ancestors: VMMaker.oscog-eem.3017
Merge Ben Avison's minor changes that help support the improvements he made for the ARM64 bitblt
=============== Diff against VMMaker.oscog-eem.3017 ===============
Item was changed: ----- Method: BitBltSimulation>>copyBits:Fallback: (in category 'setup') ----- copyBits: op Fallback: flags "Recover from the fast path specialised code saying Help-I-cant-cope" |done | <static: false> <returnTypeC: 'void'> <inline: false> <var: #op type: 'operation_t *'> <var: #flags type:'unsigned int'> self cppIf: #'ENABLE_FAST_BLT' ifTrue:[ "recover values from the operation struct used by the fast ARM code" self cCode:' combinationRule = op->combinationRule; noSource = op->noSource; sourceBits = (sqInt) op->src.bits; sourcePitch = op->src.pitch; sourceDepth = op->src.depth; sourceMSB = op->src.msb; sx = op->src.x; sy = op->src.y; destBits = (sqInt) op->dest.bits; destPitch = op->dest.pitch; destDepth = op->dest.depth; destMSB = op->dest.msb; dx = op->dest.x; dy = op->dest.y; bbW = op->width; bbH = op->height; cmFlags = op->cmFlags; cmShiftTable = (void *) op->cmShiftTable; cmMaskTable = (void *) op->cmMaskTable; cmMask = op->cmMask; cmLookupTable = (void *) op->cmLookupTable; noHalftone = op->noHalftone; halftoneHeight = op->halftoneHeight; halftoneBase = (sqInt) op->halftoneBase; if (combinationRule == 30 || combinationRule == 31) { sourceAlpha = op->opt.sourceAlpha; } if (combinationRule == 41) { componentAlphaModeColor = op->opt.componentAlpha.componentAlphaModeColor; componentAlphaModeAlpha = op->opt.componentAlpha.componentAlphaModeAlpha; gammaLookupTable = (void *) op->opt.componentAlpha.gammaLookupTable; ungammaLookupTable = (void *) op->opt.componentAlpha.ungammaLookupTable; }'. destPPW := 32 / destDepth. + sourcePPW := 32 / sourceDepth. cmBitsPerColor := 0. cmMask = 16r1FF ifTrue: [cmBitsPerColor := 3]. cmMask = 16rFFF ifTrue: [cmBitsPerColor := 4]. cmMask = 16r7FFF ifTrue: [cmBitsPerColor := 5]. + " In some places, sourceForm and destForm are compared in order to detect + whether we're reading and writing the same image. However, these have + not always been initialised by the time we get here, so substitute + sourceBits and destBits if so. " + (sourceForm == 0 and: [destForm == 0]) + ifTrue: + [sourceForm := sourceBits. + destForm := destBits]. "Try a shortcut for stuff that should be run as quickly as possible" done := self tryCopyingBitsQuickly. done ifTrue:[^nil].
bitCount := 0. "Choose and perform the actual copy loop." self performCopyLoop]
!
Item was changed: ----- Method: BitBltSimulation>>rgbComponentAlpha:with: (in category 'combination rules') ----- rgbComponentAlpha: sourceWord with: destinationWord " componentAlphaModeColor is the color, sourceWord contains an alpha value for each component of RGB each of which is encoded as0 meaning 0.0 and 255 meaning 1.0 . the rule is... color = componentAlphaModeColor. colorAlpha = componentAlphaModeAlpha. mask = sourceWord. dst.A = colorAlpha + (1 - colorAlpha) * dst.A dst.R = color.R * mask.R * colorAlpha + (1 - (mask.R * colorAlpha)) * dst.R dst.G = color.G * mask.G * colorAlpha + (1 - (mask.G* colorAlpha)) * dst.G dst.B = color.B * mask.B * colorAlpha + (1 - (mask.B* colorAlpha)) * dst.B " <inline: false> "Do NOT inline this into optimized loops" | alpha | alpha := sourceWord. + "This is not a valid optimisation because alpha == 0 can change the destination + due to rounding errors in blending and/or in gamma lookup round-trip + alpha = 0 ifTrue:[^destinationWord]." - alpha = 0 ifTrue:[^destinationWord]. ^self partitionedRgbComponentAlpha: sourceWord dest: destinationWord nBits: destDepth nPartitions: destPPW.!
vm-dev@lists.squeakfoundation.org