Skip to content

cvcGL: the GPU ocean in the library (OceanFFT, EWave, WakeSource) — O15 part 1 - #1246

Merged
transfix merged 3 commits into
masterfrom
feat/cvcgl-ocean-lib
Nov 15, 2026
Merged

transfix merged 3 commits into
masterfrom
feat/cvcgl-ocean-lib

Conversation

@transfix

Copy link
Copy Markdown
Owner

First step of O15 (docs/roadmap/OCEAN-AND-WEATHER-ROADMAP.md §11.2): the GPU ocean moves into the cvcGL library, so an Ariadne water node can draw the sea. The node itself comes in the next PR.

What changed

  • Into the library. src/cvcGL/ocean/*.cpp (OceanFFT, OceanButterfly, EWave, WakeSource, the ABYSSAL port) are now part of cvcGL: a glob of ocean/*.cpp, plus the directory as a private include. The headers stay private in ocean/.
  • Consumers. cvcgl_ocean_fft, cvcgl_ocean_band, cvcgl_ewave, cvcgl_wake and lsystem_coast no longer compile those sources themselves; they link them from cvcGL and keep the include directory. The examples always build against the in-tree cvcGL target, the standalone libcvc-examples recipe included, so the wasm gallery is unaffected.
  • Writable-data scan. The shaders' namespace-scope strings become const char *const, so the library gains no writable data. clang-format moved each one's first literal onto its own line; the string contents are unchanged (git diff -w shows only those line breaks).
  • Comments. The stale "outside the library: it has no cvc dependency" comment is corrected, and the install comment names the ABYSSAL notice next to VTK's.

Checked (MSVC Release, full build)

  • cvcgl_ocean_fft, cvcgl_ocean_band, cvcgl_ewave, cvcgl_wake pass, none skipped.
  • lsystem_coast --boat-check (3300 frames), --debris-check --wake-check (1800) and --shore-check pass.
  • Not run locally: the Linux writable-data scan; CI runs it in the package-linux release-grpc lane.

…, WakeSource)

The ABYSSAL port's sources in src/cvcGL/ocean were compiled straight into
lsystem_coast and the four cvcGL ocean tests, so nothing else could use them.
O15 (OCEAN-AND-WEATHER-ROADMAP.md section 11.2) draws the sea from an Ariadne
node, which lives in cvcGL, so they join the library: a GLOB of ocean/*.cpp,
the directory a private include of cvcGL. The tests and lsystem_coast link
them from cvcGL now and keep the include directory (the headers stay private).
The examples always link the in-tree cvcGL target, the standalone
libcvc-examples recipe included, so the browser gallery is unaffected.

The shaders' namespace-scope strings become const pointers
(const char *const), so the library gains no writable data for the
writable-data scan. clang-format moved each one's first literal onto its own
line; the strings are unchanged.

Checked (MSVC Release, full build): cvcgl_ocean_fft, cvcgl_ocean_band,
cvcgl_ewave and cvcgl_wake pass (none skipped), and lsystem_coast's
--boat-check, --debris-check --wake-check and --shore-check pass.
@transfix
transfix merged commit 162cdb7 into master Nov 15, 2026
27 of 28 checks passed
@transfix
transfix deleted the feat/cvcgl-ocean-lib branch November 15, 2026 23:25
transfix added a commit that referenced this pull request Nov 16, 2026
…#1253, #1255, #1256, #1264, #1268, #1271, #1273, #1277)

- ci.yml: the sanitizer list keeps this branch's tests (stream_test, net_ws_client_test,
  ariadne_host_test) and master's segmentation_intrinsics_test.
- STATE_EXEC_THREADED.md: the room-call verbs (room-run is #1273's) and #1252's segment.seeded
  provider in the provider table, both registered without a kind. room-call's async functions
  stay on the app's host: a reply settles on the relay client's reader thread through
  host.finish, so moving them to *ictx.host needs a finisher first.
transfix added a commit that referenced this pull request Nov 16, 2026
… sleep (#1282)

* state_exec async test: SL-7 times the sleeper from just before a warm sleep

Slices.SL07_ABetterPriorityPreempts failed all three tries in #1246's
recipe / macos-latest / Release job (run 43708365932): the runner made 62,
37 and 42 ticks past the sleeper's due time, against a limit of 32.

The test timed the due time from (arm), the step before a first
(sleep 0.02). The scheduler's due time is the sleep's own clock reading plus
20 ms, and in a fresh process (one test per ctest run) the code between the
two readings runs for the first time there: the runner's ticks over that gap
counted as lateness. On an idle Windows machine, fresh processes counted
9-24 that way; the macOS runner, 37-62.

Now (arm) is the sleep's argument, (sleep (arm)), so it reads the clock just
before the sleep does, and a (sleep 0.001) first warms the sleep's path. The
same machine counts 1-5 in fresh processes (40 runs), 0-12 warm (300), and
0-10 in fresh processes with 66 busy loops on its 22 CPUs (30). The limit
stays 32, and the count is printed.

* Ariadne action-caps test: steps checked with the time cap raised; each kill waits for its warning

AriadneAsyncFn.ActionCapsAreTreeSettingsAndChargeAsyncCalls failed three times running on
package-linux / libcvc-debug: the 200-round loop was killed with time_limit_exceeded. The
default time cap (0.1 s) is wall time, and a loaded Debug runner spent it on the loop.

- The step-cap checks raise ariadne.limits.action_max_time to 30 s, so only steps decide them.
- The default time cap gets its own check: ten million rounds with no step cap, which run into
  0.1 s on any machine (time_limit_exceeded).
- Each button is clicked alone, by its label (button_click clicked every button, so each click
  ran every program), and a kill waits up to 30 s for its own warning instead of a fixed 1 s.
- The second spin kill has its own key: a kill warns once per message.

Locally (Windows, MSVC Release): 5/5, and 160/160 with 32 copies running at once (slowest 403 ms).
transfix added a commit that referenced this pull request Nov 16, 2026
… sleep (#1282)

* state_exec async test: SL-7 times the sleeper from just before a warm sleep

Slices.SL07_ABetterPriorityPreempts failed all three tries in #1246's
recipe / macos-latest / Release job (run 43708365932): the runner made 62,
37 and 42 ticks past the sleeper's due time, against a limit of 32.

The test timed the due time from (arm), the step before a first
(sleep 0.02). The scheduler's due time is the sleep's own clock reading plus
20 ms, and in a fresh process (one test per ctest run) the code between the
two readings runs for the first time there: the runner's ticks over that gap
counted as lateness. On an idle Windows machine, fresh processes counted
9-24 that way; the macOS runner, 37-62.

Now (arm) is the sleep's argument, (sleep (arm)), so it reads the clock just
before the sleep does, and a (sleep 0.001) first warms the sleep's path. The
same machine counts 1-5 in fresh processes (40 runs), 0-12 warm (300), and
0-10 in fresh processes with 66 busy loops on its 22 CPUs (30). The limit
stays 32, and the count is printed.

* Ariadne action-caps test: steps checked with the time cap raised; each kill waits for its warning

AriadneAsyncFn.ActionCapsAreTreeSettingsAndChargeAsyncCalls failed three times running on
package-linux / libcvc-debug: the 200-round loop was killed with time_limit_exceeded. The
default time cap (0.1 s) is wall time, and a loaded Debug runner spent it on the loop.

- The step-cap checks raise ariadne.limits.action_max_time to 30 s, so only steps decide them.
- The default time cap gets its own check: ten million rounds with no step cap, which run into
  0.1 s on any machine (time_limit_exceeded).
- Each button is clicked alone, by its label (button_click clicked every button, so each click
  ran every program), and a kill waits up to 30 s for its own warning instead of a fixed 1 s.
- The second spin kill has its own key: a kill warns once per message.

Locally (Windows, MSVC Release): 5/5, and 160/160 with 32 copies running at once (slowest 403 ms).

(cherry picked from commit a5e83b1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant