Repository navigation
Match platform bindings to the C ABI - #57
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wayland and GLX pointer declarations can use the wrong C calling convention on 32-bit targets, and pointer-sized Vulkan surfaces lose their upper 32 bits. This follows the merged #56 and corrects the bindings and their callers.
.rawfrom Siwin callers.boolresults using small wrappers around privatecuintbindings. The dynamically loaded function pointer must returnunsigned int; declaring it asbooldoes not insert a conversion. The wrappers explicitly compare the full result with zero.uint64for Vulkan surface handles on every architecture, including platform bindings and the public API; the C header usesuint64_t.This replaces elcritch#7 and addresses both review comments there. Direct Wayland callers now pass raw pointers, and Vulkan callers receive a 64-bit integer. EGL callers retain boolean checks; availability and teardown checks use the private native entry points.
Validation on FreeBSD amd64 with Nim 2.2.10 and the existing X11 display (AMD Radeon 780M):
atlas-run tests _dynlib_loadingpassed with the default memory manager and--mm:refc. Includes full-width integer-to-bool regression coverage, API type checks, native EGL failure results, and a real EGL display lifecycle.atlas-run tests _opengl.nim _offscreen _vulkan _x11_api _event_looppassed (5/5), including live Vulkan rendering and X11/XCB queries.nim check --os:linux --path:src src/siwin.nimpassed for amd64;nim check --os:linux --cpu:i386 --path:src tests/t_dynlib_loading.nimpassed for i386.git diff --checkpassed.GitHub CI passes on Linux, macOS, and Windows. The local i386 validation is compile-time only; local live-display checks used X11. Downstream integration is tracked in Merenda #138.