AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.76k stars 434 forks source link

Fix building on x86 32-bit Linux #1842

Closed markreidvfx closed 12 months ago

markreidvfx commented 12 months ago

Fixes https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1841

rbx and rsi are 64-bit registers, in 32-bt you need to use ebx and esi

This 32-bit platform probably isn't getting much testing these days, I'm getting a lot of test failures on my VM.

[  23/1066] [MixingSlider / basic                                        ] - FAILED
[ 155/1066] [CPUProcessor / optimizations                                ] - FAILED
[ 162/1066] [DynamicPropertyImpl / grading_rgb_curve_knots               ] - FAILED
[ 175/1066] [FileFormat3DL / load                                        ] - FAILED
[ 196/1066] [FileFormatCTF / clf_examples                                ] - FAILED
[ 219/1066] [FileFormatCTF / tabluation_support                          ] - FAILED
[ 264/1066] [FileFormatCTF / indexMap_test1_clfv2                        ] - FAILED
[ 419/1066] [FileFormatCTF / bake_1d_3d                                  ] - FAILED
[ 422/1066] [FileFormatD1DL / test_lut1d_8i_8i                           ] - FAILED
[ 425/1066] [FileFormatD1DL / test_lut1d_16f_12i                         ] - FAILED
[ 429/1066] [FileFormatHDL / bake_1d_shaper                              ] - FAILED
[ 464/1066] [FileFormatResolveCube / bake_1d_shaper                      ] - FAILED
[ 473/1066] [FileFormatSpi1D / bake_1d_shaper                            ] - FAILED
[ 534/1066] [GpuShader / MetalSupport8                                   ] - FAILED
[ 626/1066] [ExposureContrastRenderer / video                            ] - FAILED
[ 627/1066] [ExposureContrastRenderer / log                              ] - FAILED
[ 669/1066] [GammaOp / combining                                         ] - FAILED
[ 794/1066] [Lut1DRenderer / lut_1d_inv_decreasing_reversals             ] - FAILED
[ 961/1066] [SSE2 / packed_all_test                                      ] - FAILED
[ 968/1066] [AVX / packed_all_test                                       ] - FAILED
[ 975/1066] [AVX2 / packed_all_test                                      ] - FAILED

A lot of them look like rounding errors similar to the ones we get one arm64

markreidvfx commented 12 months ago

Ya, they are probably more then just rounding errors. Some the values just off by 1. I tested 32bit on windows with msvc too and only get 1 Failed case.

FAILED: int(100000) == int((slider.mixingToSlider(slider.getSliderMaxEdge()))*100000.)
        values were '100000' and '99999'
[  23/1066] [MixingSlider / basic                                        ] - FAILED

This could be compiler related too.