Skip to content

cvcgl_shadow_pass_programs: on Apple's GL, up to 12 bytes may be more than 2 levels out - #1222

Merged
transfix merged 1 commit into
masterfrom
fix/shadow-pass-programs-apple
Nov 14, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/shadow-pass-programs-apple

Conversation

@transfix

Copy link
Copy Markdown
Owner

What failed

cvcgl_shadow_pass_programs (#996) fails on macOS's package lanes now and then. In #1171's package-macos / libcvc-release-grpc-static job it failed all three ctest attempts, and the job went red. Every miss in the macOS logs I have looks the same:

job attempts that failed where miss
#1171 libcvc-release-grpc-static (131824127850) 3 of 3 C, E, E max diff 3, 3 bytes
#1171 libcvc-release-grpc (earlier attempt) 1, then passed C max diff 3, 3 bytes
two other package-macos jobs (131627078131, 131633327748) 1 each, then passed C max diff 3, 3 bytes

In those runs every other comparison was byte for byte. The test allows 2 levels a channel, a margin set for Apple's GL, which isn't always deterministic (see cvcgl_shadow_casters). The misses are one level over it, in 3 bytes of the frame's 36,864.

The change

Only in src/cvcGL/test/cvcgl_shadow_pass_programs.cpp:

  • On a build whose GL renderer string says Apple (__APPLE__ and "Apple" in the string, as cvcgl_shadow_casters checks), a comparison also passes when at most 12 bytes differ by more than 2 levels.
  • Everywhere else the check is unchanged: within 2 levels a channel (byte for byte on NVIDIA, Mesa and Intel).
  • The test now prints the renderer, how many bytes are more than 2 levels out in each comparison, and how many bytes C's light swap changes.

It still catches a stale shader. The test's comment says C without the shader-stage MTime differs by 145 levels. On Intel Arc, C's light swap changes 26,155 of the 36,864 bytes, so shadows drawn for the wrong light would be thousands of bytes off, not 12.

What was checked

Why now

#1171's red macOS lane has two of master's tests in it: cvcgl_ewave (fixed by #1219) and this one. Neither job is required, but the same failures turn master's push runs red on macOS.

… than 2 levels out

On macOS CI the test missed in six runs across four package-macos jobs, each time by 3 bytes at
most 3 levels apart, in C or in E, with every other comparison byte for byte. On a build whose GL
renderer string says Apple, a comparison now also passes when at most 12 bytes differ by more than
2 levels. Everywhere else the 2-level check is unchanged. C's light swap changes 26155 of the
frame's 36864 bytes on Intel Arc, and the test now prints that count, so a stale shader still fails.
@transfix
transfix enabled auto-merge (squash) November 14, 2026 03:20
@transfix
transfix merged commit d4c34e9 into master Nov 14, 2026
27 checks passed
@transfix
transfix deleted the fix/shadow-pass-programs-apple branch November 14, 2026 11:52
transfix added a commit that referenced this pull request Nov 14, 2026
…#1222-#1225, #1229)

Master's #1190 (file-pick and http-upload) was written for a single async host; this branch runs
an isolated document's programs on its own group's host, on a pool worker in an `any` group.

- net_intrinsics.cpp: StartedRequest takes master's deliver()/on_outcome, settling through the
  host's finisher. http-upload is its own provider, `any` as the requests are: it parks on the
  calling program's host (ictx.host), takes its progress path from ictx.root_path (no tree walk
  on a worker), and a started upload (a browser page) keeps the host's finisher, not the host.
- ariadne.cpp: file-pick, file-info and file-forget bind into the program's env as they are, in
  every group (install_backend_verbs), not through the backend verbs' host_proxied wrapper, which
  cannot park an async verb. file-pick parks on the program's own host, claims the Runtime's
  picker hub under its lock where it is called, and opens the picker on the host thread
  (exec_pool::run_on_host; inline when called there). Its answer goes through the host's
  finisher, as the host may be gone by then.
- ci.yml: the sanitizer list keeps this branch's tests and master's point_classes_test.
- STATE_EXEC_THREADED.md: rows for http-upload, the file verbs, and the contours and
  point-classes providers. The last two are registered without a kind, so they are host_only, and
  an isolated document in an app that installs them goes to a host-affinity group.
- New test: AriadneIsolatedDocs.FilePickOpensItsPickerOnTheFramesThread.
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