[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 11a812: Hotfix for Squeak3D on 64bits VM
Nicolas Cellier
noreply at github.com
Thu Feb 27 20:40:06 UTC 2020
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 11a812894dd9c9cbb774c8d3d4cf4713936c5640
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/11a812894dd9c9cbb774c8d3d4cf4713936c5640
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2020-02-27 (Thu, 27 Feb 2020)
Changed paths:
M src/plugins/Squeak3D/Squeak3D.c
Log Message:
-----------
Hotfix for Squeak3D on 64bits VM
The B3DRasterizer state.objects store pointers to B3D objects into a 4-bytes Smalltalk WordArray.
This means that appropriate arithmetic has to take place in order to compute the number of objects stored in that WordArray
Indeed, on 64bits VM, each object pointer is going to consume 8-bytes (2 words).
That also means that proper allocation of Smalltalk WordArray has to take place at image side.
A fix to `B3DPrimitiveRasterizerState>>initObjects:` is thus also required
objects := B3DPrimitiveRasterizerData new: nObjects * (Smalltalk wordSize / 4)
The slang and image Smalltalk code have not been published yet.
They are waiting for approval of my Developer status on http://www.squeaksource.com/Balloon3D.html
More information about the Vm-dev
mailing list