Skip to content

fix(libobs-opengl): state the two macOS stage-surface conversions (#2879) - #2880

Merged
zackees merged 1 commit into
masterfrom
fix/2879-gl-stagesurf-sign-conversion
Oct 29, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/2879-gl-stagesurf-sign-conversion

Conversation

@zackees

@zackees zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member

Fixes #2879. Master's macOS Tier 2 lane is red as of #2871; this states the two conversions the Linux replay could not see.

RED

The merge-group run for #2872 (base c010b3fae) failed in Build 🧱 / Rust Tier 2 (macos-26) (job 123310954379):

libobs-opengl/gl-stagesurf.c.h:144:43: error: implicit conversion changes signedness:
'GLint' (aka 'int') to 'GLuint' (aka 'unsigned int') [-Werror,-Wsign-conversion]

This is #2871's own unit (126608195 is the last commit on that file): its RED/GREEN replay ran on Linux, and device_stage_texture()'s macOS body is #ifdef __APPLE__ (gl-stagesurf.c.h:108-155), so the replay never compiled it. The macOS build stops at the first failed TU, so the neighbouring glReadPixels conversion is not proven clean either — both are the same class as the 89 diagnostics #2871 fixed.

GREEN

libobs-opengl/gl-stagesurf.c.h, no behaviour change:

  • gl_bind_framebuffer(GL_READ_FRAMEBUFFER, (GLuint)last_fbo) — last_fbo comes from glGetIntegerv, which needs GLint *; a framebuffer binding is a non-negative name, so the restore keeps the value.
  • glReadPixels(0, 0, (GLsizei)dst->width, (GLsizei)dst->height, …) — the dimensions are the same uint32_t values the surrounding code already converts.

Evidence

No local RED/GREEN is possible: the block compiles only on Apple platforms, and PR CI does not select the macOS lane for a libobs-opengl header change. macOS evidence is the dispatched Scheduled run on this branch (full Build 🧱 matrix, including Rust Tier 2 (macos-26)); the link is in the comments. clang-format --dry-run --Werror on the file is clean. No local-gate stamp exists for the same reason — the gate's Linux lanes never compile this branch.

This unblocks #2872's merge group, which failed only on this diagnostic (its own diff is plugins/obs-outputs only).

The macOS branch of device_stage_texture() is inside #ifdef __APPLE__, so the
Linux replay behind #2871 never compiled it and missed two -Wsign-conversion
diagnostics: the framebuffer restore passes a GLint binding to
gl_bind_framebuffer(GLuint), and glReadPixels takes GLsizei widths from
uint32_t stage-surface dimensions. State both at the call; the values are
unchanged (a read-framebuffer binding is a non-negative name).
@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

macOS evidence dispatched: Scheduled 40834432835 on this branch — the full Build 🧱 matrix, so it compiles the #ifdef __APPLE__ body that PR CI's lane selection skips. Will mark ready when Rust Tier 2 (macos-26) is green.

@zackees
zackees added this pull request to the merge queue Oct 29, 2026
Merged via the queue into master with commit f37e33d Oct 29, 2026
60 of 66 checks passed
@zackees
zackees deleted the fix/2879-gl-stagesurf-sign-conversion branch October 29, 2026 07:28
@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

macOS GREEN on second attempt: Build 🧱 / Rust Tier 2 (macos-26) ✅ at 5ae959e05 (Scheduled run 40837204713).

The first attempt (run 40834432835, 4abe73578) proved the stage-surface fix and surfaced four more gl-cocoa.m.h conversions the same #ifdef blind spot hid — two uint32_t -> GLsizei in CGLTexImageIOSurface2D (527, 602) and two CGFloat -> uint32_t CGSize dimensions (260, 261) — now stated in the second commit. PR CI (Format 🔍 / checks, Fast Gate ⚡, CI Gate ✅) is green; clang-format --dry-run --Werror is clean on both files.

The Scheduled run's overall failure is the pre-existing nightly red (CEF support, the two macOS app builds and clang-analyze, which also fail on master's 2026-10-29 nightly 40825610950, before #2871); the Tier 2 macOS lane is the one #2871 broke and it is the one this PR fixes.

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