Repository navigation
fix(harris0r): stabilize delay conversion with x87 precision - #328
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On i386, x87 can retain extra precision when scaling the normalized delay, leaving values such as
(1.0 / 15.0) * 15just below an integer. Truncation then selects the previous delay, causing parameter round-trip and frame-history failures.Store the scaled value in a
volatile doublebefore integer conversion so rounding happens even when GCC retains excess precision across casts. Extend contract coverage to all 16 delays in smooth/simple modes with separate and in-place buffers, and verify values on either side of each normalized boundary retain truncation behavior.Add a native i386 PR CI job on Ubuntu using
gcc-multilib,g++-multilib, and-m32for both C and C++. Install i386 OpenGL/EGL development packages for CMake discovery and select the i386 pkg-config metadata. Build six core contract executables, verify they are ELF32 Intel 80386 binaries, and execute them directly on the runner.Validation:
-m32: 6 passed, 0 failed. Includes harris0r, slitscan0r, aech0r, and three motiondiff0r contracts; all six binaries verified as 32-bit.ctest --test-dir build/issue327-native -R '^harris0r(-contract)?$' --output-on-failure: 2 passed.-mfpmath=387, at-O0,-O2, and-O3, with-fexcess-precision=standardandfast: all six configurations passed.git diff --check: passed.Fixes #327.