Repository navigation
Core-only Linux build with CI, sanitizer fixes and a limitations list - #1
Merged
Merged
Conversation
…sdf_precompute with GCC on Linux against system libraries NOVA_CORE_ONLY (the default away from Windows) leaves out the Hydra delegate, the Houdini package, nova_cli, nova_imgcmp and the GPU backend and takes TBB, OpenSubdiv, Embree and Catch2 from the system (cmake/NovaStandalone.cmake). The NanoVDB 32.6 headers Houdini 22.0 ships are fetched from the OpenVDB repository when the system has none or older ones. Presets: core (Release) and core-sanitize (AddressSanitizer, UBSan, float casts). The full Windows build is unchanged apart from two new interface targets, Nova::OpenSubdiv and Nova::NanoVDB, that stand for Houdini's osdCPU and toolkit headers. What GCC 13 needed: - subdiv.cpp: a vector constructor that GCC parses as a function declaration (static_cast in place of the functional cast). - surface.cpp: <iterator> for std::begin and std::end. - -march=haswell and -ffp-contract=off: the instruction sets of /arch:AVX2, and no FMA contraction, as MSVC and the GPU kernels (--fmad=false). - Warnings: the two light types the scene builds itself named in buildLightData's switch, three arrays initialised, an unused copy of inversePoint removed from scene.cpp. All 392 unit tests of nova_tests pass on Linux (387; the 5 GPU tests skip). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019BqpPjzxKkWa7ay5MgDGrc
…r UV corner no longer drops a triangle from the bake grid An AddressSanitizer and UBSan run of the unit tests (core-sanitize preset) found no memory error and one class of undefined behaviour: floats converted to int beyond int's range or as NaN. x86 gives INT_MIN there, CUDA saturates and turns NaN into 0, so the CPU and the GPU could shade such values differently. - core/math/common.h: toInt (truncation; INT_MIN out of range and for NaN, what the CPU gave) and clampToInt (clamped as a float first). - Noise: floorInt goes through toInt; Worley's neighbour cells are summed in 64 bits (INT_MIN - 1 overflowed). In-range positions hash as before. - hsvToRgb's hue sector and the fractal opcode's octave count use toInt. - Volumes: the multiple-scattering start level is clamped before lround (NaN: level 0), which also bounds the level difference. - MemorySampler: texel coordinates through toInt. - Bake: the lookup grid's cell range was converted before it was clamped, so a triangle with a UV corner past 2^31 grid cells (u = 1e9; with a 2048 grid from u = 1e6) covered no cell and was never found. It is clamped as a float now. Tests: toInt and clampToInt, noise at positions beyond int's range, octave counts, the start level, and a bake lookup inside a triangle that reaches u = 1e9 (fails before the fix). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019BqpPjzxKkWa7ay5MgDGrc
…ecked on load loadCheckpoint compared four of the adaptive sampler's ten per-pixel arrays with the film's pixel count. A file whose evaluated, noisy, halfAlpha, dsq, lum or dsqAlpha array was shorter loaded, and the oracle then indexed it by pixel past its end. All ten must have one value per pixel now, and a fill stride of 0 (hosts divide by it) or beyond 65536 is refused. Test: "Checkpoints with a short adaptive-sampling array are refused" (the old loader accepts six of the ten shortened files and the zero stride). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019BqpPjzxKkWa7ay5MgDGrc
… in the README, a workflow that builds and tests the core - docs/limitations.md: what Nova 0.1.0 does not do, by area, with what happens instead and where it comes from (the code's warnings and the design notes, each checked against the code). The per-milestone "Not yet" lines of the reference describe their milestone; the reference says so. - README: the core-only build, its presets and what it leaves out. - docs/bug-audit-2026-11.md, section 9: the sanitizer pass (S-1 to S-3) and what it did not cover (the GPU kernels, the Windows build, Hydra). - .github/workflows/core.yml: on pull requests and pushes to main, the core and its unit tests on Ubuntu 24.04 with the core and core-sanitize presets. - tests: in a core-only build ctest reports the tests that skip themselves without a GPU as skipped (Catch2's exit code 4), not as failed. ctest --preset core and ctest --preset core-sanitize: 398 tests, 393 pass, 5 skip. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019BqpPjzxKkWa7ay5MgDGrc
…e, the build modules and CI in the README's layout - M3: the kernel-side rule for float-to-int conversions (K14) and the noise's cells beyond int's range (M3.7). - M10: the conversions under CPU/GPU agreement (G0 notes). - M8: the clamped start level of the volume modifiers. - M11-P6: what a checkpoint must match to be read. - M11-P8: the lookup grid's cell range of a triangle. - README: cmake/ and .github/workflows/ in the repository layout; what the sanitizer preset checks. - Reference: the core-only test presets and the skipped GPU tests. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019BqpPjzxKkWa7ay5MgDGrc
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.
Summary
The renderer core could only be built with MSVC against a Houdini installation, so it had no second compiler, no sanitizer coverage and no CI. This PR makes
nova_coreand its unit tests build on Linux without Houdini, runs them in CI, fixes what the sanitizers and a review of the loaders found, and collects Nova's current limitations in one document.Not verified here: the Windows build with Houdini and the GPU kernels. Everything was built and tested with GCC 13 on Linux only;
kernels.cuand the MSVC build were not compiled, and no[gpu]test ran. A build on Windows with Houdini is still owed.Changes
Core-only build (
NOVA_CORE_ONLY)cmake/NovaStandalone.cmake: TBB, OpenSubdiv, Embree and Catch2 from the system; the NanoVDB 32.6 headers Houdini 22.0 ships are fetched from the OpenVDB repository when the system has none or older ones.core(Release) andcore-sanitize(AddressSanitizer, UBSan, float casts). It is the default away from Windows.nova_cli,nova_imgcmpand the GPU backend.Nova::OpenSubdivandNova::NanoVDB, that stand for Houdini's osdCPU and toolkit headers.subdiv.cpp,surface.cpp) and a warning-clean-Wallbuild.CI
.github/workflows/core.yml: both presets on Ubuntu 24.04, on pull requests and pushes tomain.Fixes (details in
docs/bug-audit-2026-11.md, section 9)INT_MIN, CUDA saturates and turns NaN into 0, so CPU and GPU could shade such values differently. Noise cells, the HSV hue sector, octave counts and the volume modifiers' start level now convert throughtoInt/clampToInt(core/math/common.h) and give what the CPU gave. In-range values are unchanged.loadCheckpointchecked four of the adaptive sampler's ten per-pixel arrays; a file with a shorter one loaded and was read past its end. A fill stride of 0 loaded too.Docs
docs/limitations.md: what Nova 0.1.0 does not do, by area, with what happens instead and where it comes from.Testing
ctest --preset core: 398 tests, 393 pass, 5 skip (they need a GPU).ctest --preset core-sanitize: the same, with no sanitizer finding.lpe::compileunder the sanitizers, no finding.🤖 Generated with Claude Code
https://claude.ai/code/session_019BqpPjzxKkWa7ay5MgDGrc