Skip to content

Map C int to i32 for V3-safe Vulkan FD exports - #16

Merged
antono3 merged 1 commit into
masterfrom
fix/c-int32-v3
Sep 23, 2026
Merged

antono3 merged 1 commit into
masterfrom
fix/c-int32-v3

Conversation

@antono3

@antono3 antono3 commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Map Vulkan registry C int to V i32, including pointer parameters and struct fields. V3 uses 64-bit int on 64-bit hosts; its &int has the wrong ABI for a C int* output. This affects the Vulkan external-memory, semaphore, and fence FD exports.

Add i32 to the generator's base scalar types so &i32 output parameters retain the same mutability treatment as &int.

Verification

  • python3 -m py_compile src/vgenerator.py
  • Generator type translation: int, int*, and int** map to i32, &i32, and &&i32; &i32 output is not marked mut.
  • A matching generated antono2/vulkan change and particle caller update compile and complete Vulkan–OpenCL zero-copy memory and semaphore smoke tests under V 0.5.2 and a locally patched V3 compiler.

The generated module change is in a separate antono2/vulkan PR.

@antono3
antono3 merged commit acacf0b into master Sep 23, 2026
7 checks passed
@antono3
antono3 deleted the fix/c-int32-v3 branch September 23, 2026 18:28
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.

2 participants