Mantis - Squeak
Viewing Issue Advanced Details
7407 VM major always 10-26-09 12:50 04-18-10 21:51
jmvuletich  
lewis  
normal  
closed  
fixed  
none    
none trunk  
0007407: BitBlt. Incorrect alpha values for several rules.
The alpha of the result is wrong in rgbAdd, rgbSub, rgbMax, rgbMin and rgbMinInvert. The main problem is that all the words inBitBlt are treated as int and not as unsigned int. This does not affect most operations, but it does affect comparisions when the most significant bit is 1 (i.e., the leftmost bit in alpha in 32bpp Forms). A second problem is that in C, integer aritmethic overflows silently. This affected rgbAdd.
Test and Fix included.
+ BitBlt-Tests-jmv-M7407.cs includes the tests and should be loaded in Trunk.
+ VMMaker-BitBltSimulationTests-jmv-M7407.cs includes tests that are specific to VMMaker and should be part of it.
+ VMMaker-BitBlt-AlphaFixes-jmv-M7407.cs is the fixes (for VMMaker).
+ VMMakerCodeGenerationFix-jmv-M7407.cs is a fix for VMMaker.
 BitBlt-Tests-jmv-M7407.cs [^] (6,716 bytes) 10-26-09 12:51
 VMMaker-BitBltSimulationTests-jmv-M7407.cs [^] (1,905 bytes) 10-26-09 12:52
 VMMaker-BitBlt-AlphaFixes-jmv-M7407.cs [^] (6,415 bytes) 10-26-09 12:52
 VMMakerCodeGenerationFix-jmv-M7407.cs [^] (858 bytes) 10-26-09 12:53

Notes
(0013371)
lewis   
10-30-09 01:47   
The six new tests for BitBltTest have been added to Squeak trunk. The two simulation tests have been added to VMMaker, but should not be removed from trunk until perhaps six months from now (because not everyone is using the same VMMaker package).

VMMaker is updated with VMMaker-BitBltSimulationTests-jmv-M7407.cs and VMMakerCodeGenerationFix-jmv-M7407.cs, plus additional updates from BitBltTweaks.1.cs from Juan on vm-dev mailing list.

The fixes in VMMaker-BitBlt-AlphaFixes-jmv-M7407.cs look right to me, and they fix the documented bugs. I have not yet applied them to VMMaker in case there are other comments or fixes (Eliot mentioned Cog fixes).
(0013376)
lewis   
11-02-09 11:51   
VMMaker-BitBlt-AlphaFixes-jmv-M7407.cs and VMMakerCodeGenerationFix-jmv-M7407.cs are in VMMaker-dtl.147 on SqueakSource. All fixes and tests are now in Squeak trunk and VMMaker.

Remaining open issue: Remove tests from BitBltTest (moved to BitBltSimulation in VMMaker), but wait a few months before doing this.
(0013700)
laza   
04-13-10 12:37   
According to the tests this has been fixed in all VMs