Repository navigation
fix(vk-gen): generate image layout, clear image and fd properties wrappers - #376
Merged
Merged
Conversation
vk-gen had no mapping for C int, so it fell through to Go's 64-bit int. vkGetMemoryFdKHR, vkGetSemaphoreFdKHR and vkGetFenceFdKHR wrote a 32-bit fd into the low half of an int64, leaving the upper half undefined, and the import fd structs and VkNativeBufferANDROID had the wrong layout.
…ppers vk-gen skipped vkGetImageSubresourceLayout, vkCmdClearColorImage and vkGetMemoryFdPropertiesKHR as unsupported signatures, so the vk package had no way to call them. Map their signatures to new call interfaces and classify C int as i32. The same signatures also cover vkGetImageSparseMemoryRequirements, vkGetImageSubresourceLayout2, vkGetMicromapBuildSizesEXT and vkCmdClearDepthStencilImage.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
syscall.Close takes a syscall.Handle on Windows, so the shared test file did not compile there. Dma-buf file descriptors exist only on Linux; move TestGetMemoryFdPropertiesKHR and its structure type into generated_wrappers_linux_test.go.
kolkov
approved these changes
Nov 2, 2026
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.
vk-gen skipped
vkGetImageSubresourceLayout,vkCmdClearColorImageandvkGetMemoryFdPropertiesKHRas unsupported signatures, so thevkpackage could not call them. Their signatures now map to new call interfaces (Cintparams classify as i32), which also generatesvkGetImageSparseMemoryRequirements,vkGetImageSubresourceLayout2,vkGetMicromapBuildSizesEXTandvkCmdClearDepthStencilImage. Builds on #372 (theint32fd type); the GPU tests skip without a Vulkan driver.