Skip to content

fix: state the macOS-only conversions the #2625 replay cannot see (libobs-opengl, libobs) (#2879) - #2892

Closed
zackees wants to merge 3 commits into
masterfrom
fix/2879-gl-cocoa-conversions
Closed

zackees wants to merge 3 commits into
masterfrom
fix/2879-gl-cocoa-conversions

Conversation

@zackees

@zackees zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member

Fixes #2879 (reopened: #2880 merged with only its first commit).

What

#2880 (f37e33dd2) stated the two stage-surface conversions, but it was merged before its second commit pushed: the macOS Tier 2 lane on that branch still had four gl-cocoa.m.h diagnostics from the same blind spot. This PR is that remainder, rebased onto current master.

Diagnostics (macOS Tier 2, run 40834432835 on 4abe73578)

libobs-opengl/gl-cocoa.m.h:260:93: error: implicit conversion turns floating-point number into
integer: 'CGFloat' (aka 'double') to 'uint32_t' [-Werror,-Wfloat-conversion]
libobs-opengl/gl-cocoa.m.h:261:85: same, updateData.textureSize.height
libobs-opengl/gl-cocoa.m.h:527:78 / :90 and 602:78 / :90: implicit conversion changes signedness:
'uint32_t' to 'GLsizei' [-Werror,-Wsign-conversion]

Like #2871's other 89 diagnostics these are only reachable on Apple platforms, which its Linux replay could not compile.

GREEN

libobs-opengl/gl-cocoa.m.h, no behaviour change:

  • device_texture_create(device, (uint32_t)updateData.textureSize.width, (uint32_t)updateData.textureSize.height, …) — CGSize dimensions into the target's uint32_t width/height (a backing texture size is integral by construction).
  • CGLTexImageIOSurface2D(…, (GLsizei)tex->width, (GLsizei)tex->height, …) at both call sites — the same uint32_t texture fields the surrounding code converts elsewhere.

clang-format --dry-run --Werror is clean. Opened as a draft because PR CI does not select the macOS lane for a libobs-opengl header change; macOS evidence is a dispatched Scheduled run on this branch (link in the comments), and the PR goes ready when Rust Tier 2 (macos-26) is green.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

macOS evidence dispatched: Scheduled 40840735859. Draft on purpose: #2880 went non-draft and the coordinator merged it (squash f37e33dd2) while its macOS lane was still proving the second half, so this remainder is the second commit rebased onto current master.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

macOS evidence from this branch (run 40840734740, job 123337721271): the four gl-cocoa.m.h diagnostics are gone — no gl-cocoa.m.h line in the failure. What fails now is libobs/obs-cocoa.m.h (161, 727, 836, 861), which is #2887`s ratchet, not this PR.

So this PR is correct but blocked on #2887: I rebase onto origin/master after it merges, re-run macOS Tier 2, then mark ready and queue.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Blocked: waits on #2887 (macOS ratchet for libobs/obs-cocoa.m.h); rebase and re-run macOS Tier 2 after it merges.

@zackees zackees changed the title fix(libobs-opengl): state the macOS Cocoa conversions too (#2879) fix: state the macOS-only conversions the #2625 replay cannot see (libobs-opengl, libobs) (#2879) Oct 29, 2026
@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Round 3: the previous dispatch's Rust Tier 2 (macos-26) (job 123344122898) got past gl-cocoa.m.h and stopped in libobs/obs-cocoa.m.h — the same Linux-replay blind spot, now in #2877's target: (size_t)max_size (161), (int)key - 1 (727), (UInt16)code (836), (CFIndex)length (861). Added in 645e9ad92 and re-dispatched; the title now covers both targets.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Round 4: job 1233614100xx's log had one remaining error, libobs/audio-monitoring/osx/coreaudio-output.c.h:180 (strlen size_t -> CFIndex), now stated in a523db5da. Error count across rounds: 2 (stage-surf) -> 6 (gl-cocoa) -> 4 (obs-cocoa) -> 1. Re-dispatched.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

A parallel worker's c0b4db5ab landed the CoreAudio UID-length fix on this branch before my identical local commit pushed; I kept theirs and dropped mine (no diff between the two). The in-flight Scheduled run 40847947171 is at c0b4db5ab, i.e. it includes every fix so far: stage-surface, gl-cocoa (6), obs-cocoa (4), coreaudio-output (1).

The first green attempt still failed: the same #ifdef-only blind spot hides
four more -Wsign-conversion diagnostics (CGLTexImageIOSurface2D takes GLsizei
widths from uint32_t texture fields) and two -Wfloat-conversion ones (CGSize
CGFloat dimensions into device_texture_create's uint32_t). State them at the
call; values unchanged.
The libobs ratchet (#2877) had the same Linux-only replay blind spot: the
macOS Tier 2 lane then reported CFIndex -> size_t (dstr_reserve), obs_key_t ->
int (mouse button index), int -> UInt16 (UCKeyTranslate key code) and
UniCharCount -> CFIndex (CFStringCreateWithCharactersNoCopy). State each at
the call; values unchanged.
-Wsign-conversion on the macOS Tier 2 lane rejects strlen()'s size_t as the
CFIndex byte count; cast at the boundary.
@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

macOS evidence (nightly dispatch on this branch)

scheduled.yaml dispatched on fa2550b83 (run 40848437756), the only lane that compiles these TUs — PR CI skips Build 🧱 / macOS 🍏 for libobs/*.c.h paths.

Both macOS builds (x86_64 job 123362314991, arm64 job 123362315003) got past this PR's four conversions and then stopped on the next wave, all in files this PR does not touch:

libobs/obs-scene.c.h:674,676,771,808      enum gs_color_space / obs_blending_type / obs_blending_method -> int
libobs/obs-source-deinterlace.c.h:237..  enum obs_deinterlace_mode / gs_color_space -> int

19 -Werror,-Wsign-conversion diagnostics in total, all enum -> int at libobs's Rust seam call sites. That is exactly the wave #2896 / #2897 covers, so the lane cannot be green on this PR alone: master's own nightly (run 40825610950, job 123287993311) stops one diagnostic earlier on int -> enum rist_profile, and each conversion fix only reveals the next TU's diagnostics. Landing order is #2892 -> #2897 -> #2886, and the nightly has been re-dispatched on the #2886 head (whole stack) for the green proof.

What this PR does prove on macOS: the three CFIndex/GLint-class conversions in gl-cocoa.m.h, obs-cocoa.m.h and coreaudio-output.c.h no longer appear in either architecture's log.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Coordinator note (2026-10-29): this draft is what the merge queue is ejecting on

Evidence that master's macOS Tier 2 is red on the exact four libobs/obs-cocoa.m.h diagnostics this PR fixes, and that it ejects unrelated PRs ahead of the fix:

The master push run 40847674702 skipped Rust Tier 2 (macos-26), so master was never compiled for Apple platforms outside the queue — the queue is the first place these surface. Until this lands, every queue entry whose diff selects the macOS lane ejects.

What is missing is not the fix but the evidence: PR CI skips the heavy lanes on a draft, so this branch has no Rust Tier 2 (macos-26) run at fa2550b8. Marking it ready (or a dispatch that selects the macOS lane) turns that into a check, and then it can be queued in the same tick — I will queue it as soon as it is green.

One thing to keep in sync with the claim on #2896: that plan says "once the obs-cocoa.m.h four were fixed", then casts 19 enum → int seam sites. Those 19 are the wave behind this one, so #2896's branch is red until this PR lands.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Superseded by #2897 — closing rather than leaving a second macOS-red PR in the queue.

Why: this PR's own three commits went green on the macOS lane (Build 🧱 / macOS 🍏 (arm64) success on Scheduled 40855996033, at 91bf158bf), but that lane can only be green with #2896's enum -> int seam casts, which are the commits stacked on top of these in #2897's branch. #2897's base is master and its diff contains all three cocoa commits plus the seam fixes, so merging it lands this work as one green unit; keeping this PR open would just queue the same code twice and hold master red in between.

The Fixes #2879 remains in #2897's body for the coreaudio part; the gl-cocoa and obs-cocoa conversions are covered by the same run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug(libobs-opengl): macOS Tier 2 red at gl-stagesurf.c.h:144 after #2871 (GLint -> GLuint)

1 participant