Skip to content

Use merged upstream Siwin ABI fixes and X11 helpers - #97

Merged
elcritch merged 9 commits into
mainfrom
fix/siwin-upstream-abi
Oct 11, 2026
Merged

elcritch merged 9 commits into
mainfrom
fix/siwin-upstream-abi

Conversation

@elcritch

@elcritch elcritch commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Use upstream Siwin 78bb49c7fd7e5e14590f567e1ccbb07eb5ab6739, which includes the merged optional-platform-library fixes (#56), C ABI corrections (#57), and reusable X11 helpers (#58).

Preserve Siwin's uint64 Vulkan surface handles through renderer setup, while retaining pointer inputs for other backends. Use x11api.Drawable, getWindowVisualInfo, and x11XcbConnection directly and delete siwinx11compat.nim. Siwin now owns the Xlib query allocation and returns a visual-info value; a missing XCB bridge still returns nil so Vulkan's existing fallback remains available.

No render-data ownership or GC behavior changes. The returned visual and XCB connection remain borrowed from the Xlib display.

Validation on FreeBSD amd64 / Nim 2.2.10, using the live X11 display and AMD Radeon 780M, with upstream Siwin 78bb49c7:

  • atlas install -tuk passed; the active nim.cfg path selects the upstream Siwin checkout at the pinned commit.
  • atlas-run tests siwin_fallback_window render_rgb_boxes_sdf_siwin vulkan_frame_resources passed: native visual/XCB queries, absent bridge, uint64 handle preservation, Vulkan frame resources, and rendering/screenshot checks.
  • atlas-run tests render_rgb_boxes_sdf_siwin -- -d:vulkanCrashTest passed. Injecting Vulkan attachment failure exercises the moved visual helper while creating an X11 GLX fallback context, then renders and captures a screenshot.
  • atlas-run tests siwin_fallback_window render_rgb_boxes_sdf_siwin -- -d:figdraw.opengl=on -d:figdraw.vulkan=off passed.
  • git diff --check passed.

Merenda #138 tracks this FigDraw branch and the same merged upstream Siwin commit.

@elcritch elcritch changed the title Use merged Siwin platform ABI and optional library fixes Use Siwin platform ABI fixes and shared X11 helpers Oct 6, 2026
@elcritch elcritch changed the title Use Siwin platform ABI fixes and shared X11 helpers Use merged upstream Siwin ABI fixes and X11 helpers Oct 7, 2026
@elcritch
elcritch merged commit 39ea587 into main Oct 11, 2026
8 checks passed
@elcritch
elcritch deleted the fix/siwin-upstream-abi branch October 11, 2026 21:53
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